MLK-16013-44 staging: typec: tcpm: set data role after src detach
authorLi Jun <jun.li@nxp.com>
Fri, 18 Aug 2017 19:11:57 +0000 (03:11 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:48 +0000 (15:36 -0500)
As the default data role is device mode if the port is not host,
so set the port data role to be device mode after src detach, this
is to fix the issue of port data role still kept to be host while
the port is open.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/staging/typec/tcpm.c

index 0bfd4c3..723b80b 100644 (file)
@@ -2036,6 +2036,7 @@ static void tcpm_detach(struct tcpm_port *port)
 
 static void tcpm_src_detach(struct tcpm_port *port)
 {
+       port->data_role = TYPEC_DEVICE;
        tcpm_detach(port);
 }