summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorEric Yilun Lin <yllin@chromium.org>2021-04-07 16:08:59 +0800
committerCommit Bot <commit-bot@chromium.org>2021-04-08 03:30:36 +0000
commit1370a872dd381369fb1d75113a43a147fd31105f (patch)
tree9c77d07be4e3351f002a2f39a80cc610215defe1 /common/usb_pd_protocol.c
parent974b3d7e4621a449672df5267007c7aeb2d7af68 (diff)
downloadchrome-ec-1370a872dd381369fb1d75113a43a147fd31105f.tar.gz
TCPMv1: clear SourceCap in disconnected state
Clear the SourceCaps to prevent misleading info. BUG=none TEST=`pd 0 srccaps` no output if adapter unplugged BRANCH=asurada Change-Id: Ibfefb3cc2e91c548fdf6579603dd5be20d68c08e Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2810659 Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 5d883760dd..ca28ed852a 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -3212,7 +3212,7 @@ void pd_task(void *u)
break;
case PD_STATE_SRC_DISCONNECTED:
timeout = 10*MSEC;
-
+ pd_set_src_caps(port, 0, NULL);
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
/*
* If SW decided we should be in a low power state and
@@ -3900,7 +3900,7 @@ void pd_task(void *u)
#else
timeout = 10*MSEC;
#endif
-
+ pd_set_src_caps(port, 0, NULL);
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
/*
* If SW decided we should be in a low power state and