diff options
author | Marc Zyngier <maz@kernel.org> | 2023-09-17 13:31:15 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-09-17 13:38:39 +0100 |
commit | ed219367d8396c5cfc554c53fb59470444eaeb57 (patch) | |
tree | 285160454288d874a3ded2b6bfa5821a9b5f2875 | |
parent | a04e7ca7ee065acc42316b629972ca5c6b968493 (diff) | |
download | cs-sw-ed219367d8396c5cfc554c53fb59470444eaeb57.tar.gz |
Drop everything related to the UFP Connected state
We only use the DFP configuration, and the UFP setup is now an
obsolete leftover (until someone decide that they actually want
it...).
Drop the bits of code related to UFP Connected state.
Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r-- | vdmtool.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -14,7 +14,6 @@ enum state { STATE_INVALID = -1, STATE_DISCONNECTED = 0, - STATE_CONNECTED, STATE_READY, STATE_DFP_VBUS_ON, STATE_DFP_CONNECTED, @@ -120,28 +119,6 @@ static void evt_dfpconnect(struct vdm_context *cxt, int16_t cc1, int16_t cc2) debug_poke(cxt); } -static void evt_connect(struct vdm_context *cxt) -{ - int16_t cc1 = -1, cc2 = -1; - fusb302_tcpm_get_cc(PORT(cxt), &cc1, &cc2); - cprintf(cxt, "Connected: cc1=%d cc2=%d\n", cc1, cc2); - if (cc1 < 2 && cc2 < 2) { - cprintf(cxt, "Nope.\n"); - return; - } - fusb302_pd_reset(PORT(cxt)); - fusb302_tcpm_set_msg_header(PORT(cxt), 0, 0); // Sink - if (cc1 > cc2) { - fusb302_tcpm_set_polarity(PORT(cxt), 0); - cprintf(cxt, "Polarity: CC1 (normal)\n"); - } else { - fusb302_tcpm_set_polarity(PORT(cxt), 1); - cprintf(cxt, "Polarity: CC2 (flipped)\n"); - } - fusb302_tcpm_set_rx_enable(PORT(cxt), 1); - STATE(cxt, CONNECTED); -} - static void evt_disconnect(struct vdm_context *cxt) { vbus_off(cxt); @@ -605,9 +582,6 @@ static void state_machine(struct vdm_context *cxt) } break; } - case STATE_CONNECTED:{ - break; - } case STATE_DFP_VBUS_ON:{ if (++cxt->source_cap_timer > 37) { send_source_cap(cxt); |