From bb1d6c84615cb9e91e35983bdbae8250e6ffcfc9 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Wed, 9 Jan 2019 12:59:18 +0530 Subject: [PATCH] MLK-16013-44 usb: typec: tcpm: set data role after src detach 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 Signed-off-by: Li Jun Signed-off-by: Vipul Kumar --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 4056ad1ff34e..c1cd6254f5af 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -2776,6 +2776,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); } -- 2.17.1