From 89ece16c264b89ac7f082c67224cc9ff3b3dc515 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Wed, 9 Jan 2019 12:44:21 +0530 Subject: [PATCH] MLK-16013-34 usb: typec: Support cc changes on RP pull-up value CC line changes on souce side RP value is permitted per standard, in this case we should move to SNK_ATTACH_WAIT. Reviewed-by: Peter Chen Signed-off-by: Li Jun Signed-off-by: Vipul Kumar --- drivers/usb/typec/tcpm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 8f60ae095be5..441af403a099 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -3723,6 +3723,9 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, new_state = SNK_UNATTACHED; else if (port->vbus_present) new_state = tcpm_try_src(port) ? SRC_TRY : SNK_ATTACHED; + else if (cc1 > TYPEC_CC_RP_DEF || cc2 > TYPEC_CC_RP_DEF) + /* CC changes on pull-up value */ + new_state = SNK_ATTACH_WAIT; else new_state = SNK_UNATTACHED; if (new_state != port->delayed_state) -- 2.17.1