|
@@ -153,7 +153,7 @@ static enum policy_engine_state pe_sink_eval_cap(struct pdb_config *cfg)
|
153
|
153
|
static enum policy_engine_state pe_sink_select_cap(struct pdb_config *cfg)
|
154
|
154
|
{
|
155
|
155
|
/* Transmit the request */
|
156
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) last_dpm_request, TIME_IMMEDIATE);
|
|
156
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) last_dpm_request, TIME_IMMEDIATE);
|
157
|
157
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
158
|
158
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
159
|
159
|
| PDB_EVT_PE_RESET);
|
|
@@ -427,7 +427,7 @@ static enum policy_engine_state pe_sink_get_source_cap(struct pdb_config *cfg)
|
427
|
427
|
get_source_cap->hdr = PD_MSGTYPE_GET_SOURCE_CAP | PD_DATAROLE_UFP
|
428
|
428
|
| PD_SPECREV_2_0 | PD_POWERROLE_SINK | PD_NUMOBJ(0);
|
429
|
429
|
/* Transmit the Get_Source_Cap */
|
430
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) get_source_cap, TIME_IMMEDIATE);
|
|
430
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) get_source_cap, TIME_IMMEDIATE);
|
431
|
431
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
432
|
432
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
433
|
433
|
| PDB_EVT_PE_RESET);
|
|
@@ -454,7 +454,7 @@ static enum policy_engine_state pe_sink_give_sink_cap(struct pdb_config *cfg)
|
454
|
454
|
cfg->dpm.get_sink_capability(cfg, snk_cap);
|
455
|
455
|
|
456
|
456
|
/* Transmit our capabilities */
|
457
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) snk_cap, TIME_IMMEDIATE);
|
|
457
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) snk_cap, TIME_IMMEDIATE);
|
458
|
458
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
459
|
459
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
460
|
460
|
| PDB_EVT_PE_RESET);
|
|
@@ -521,7 +521,7 @@ static enum policy_engine_state pe_sink_soft_reset(struct pdb_config *cfg)
|
521
|
521
|
accept->hdr = PD_MSGTYPE_ACCEPT | PD_DATAROLE_UFP | PD_SPECREV_2_0
|
522
|
522
|
| PD_POWERROLE_SINK | PD_NUMOBJ(0);
|
523
|
523
|
/* Transmit the Accept */
|
524
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) accept, TIME_IMMEDIATE);
|
|
524
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) accept, TIME_IMMEDIATE);
|
525
|
525
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
526
|
526
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
527
|
527
|
| PDB_EVT_PE_RESET);
|
|
@@ -551,7 +551,7 @@ static enum policy_engine_state pe_sink_send_soft_reset(struct pdb_config *cfg)
|
551
|
551
|
softrst->hdr = PD_MSGTYPE_SOFT_RESET | PD_DATAROLE_UFP | PD_SPECREV_2_0
|
552
|
552
|
| PD_POWERROLE_SINK | PD_NUMOBJ(0);
|
553
|
553
|
/* Transmit the soft reset */
|
554
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) softrst, TIME_IMMEDIATE);
|
|
554
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) softrst, TIME_IMMEDIATE);
|
555
|
555
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
556
|
556
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
557
|
557
|
| PDB_EVT_PE_RESET);
|
|
@@ -612,7 +612,7 @@ static enum policy_engine_state pe_sink_send_reject(struct pdb_config *cfg)
|
612
|
612
|
| PD_POWERROLE_SINK | PD_NUMOBJ(0);
|
613
|
613
|
|
614
|
614
|
/* Transmit the message */
|
615
|
|
- chMBPost(&pdb_prltx_mailbox, (msg_t) reject, TIME_IMMEDIATE);
|
|
615
|
+ chMBPost(&cfg->prl.tx_mailbox, (msg_t) reject, TIME_IMMEDIATE);
|
616
|
616
|
chEvtSignal(cfg->prl.tx_thread, PDB_EVT_PRLTX_MSG_TX);
|
617
|
617
|
eventmask_t evt = chEvtWaitAny(PDB_EVT_PE_TX_DONE | PDB_EVT_PE_TX_ERR
|
618
|
618
|
| PDB_EVT_PE_RESET);
|