summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2017-08-19 03:11:57 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:28:16 +0800
commit09ced0428dc467125eacd1d078f37eb8ba0a5ee7 (patch)
treeb0449520a136ac0f24d74ba860d6a7e762030c32 /drivers/staging
parentbcf525b8078b2c24d379735a9c304557b9833a97 (diff)
MLK-16013-44 staging: 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 <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/typec/tcpm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index ed4abee7717b..9f83ba8b2937 100644
--- a/drivers/staging/typec/tcpm.c
+++ b/drivers/staging/typec/tcpm.c
@@ -2100,6 +2100,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);
}