After the hack of moving forward tcpm state machine for source
only port but with usb data device mode support, we need further
to create its partner, so app(like android) can use it to judge if
the connection exists or not.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
if (ret < 0)
tcpm_set_state(port, SNK_UNATTACHED, 0);
else if (port->port_type == TYPEC_PORT_SRC &&
- port->typec_caps.data == TYPEC_PORT_DRD)
+ port->typec_caps.data == TYPEC_PORT_DRD) {
+ tcpm_typec_connect(port);
tcpm_log(port, "Keep at SNK_ATTACHED for USB data.");
- else
+ } else
tcpm_set_state(port, SNK_STARTUP, 0);
break;
case SNK_STARTUP: