summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2020-10-22 20:36:08 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-23 20:05:31 +0000
commit51a0199ff27d57654979f60895b772ae08becb08 (patch)
treedf2f011d157138ab32f20d9aec9c6cbd66439bee
parent0dc36ee6f6fc647fcd12e0367f1722caca95551a (diff)
downloadchrome-ec-51a0199ff27d57654979f60895b772ae08becb08.tar.gz
ps8xxx: Fix the check of entering low power mode
The existing check uses IS_ENABLED(CONFIG_USB_PD_TCPM_PS8751) that is wrong if CONFIG_USB_PD_TCPM_MULTI_PS8XXX is used. Multiple CONFIGs are defined, like defining PS8751; however, the board may not use PS8751 actually. Should check the board_get_ps8xxx_product_id() result which is stored in product_id[]. BRANCH=None BUG=b:171446429 TEST=On Lazor board which uses PS8805, enabled i2ctrace and checked the I2CIDLE command was issued when entering low power mode. Change-Id: I9e4a2b7ef905084a30845fbbfc4474a6182096e0 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2493790 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
-rw-r--r--driver/tcpm/ps8xxx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c
index 9fb6d31544..e725576985 100644
--- a/driver/tcpm/ps8xxx.c
+++ b/driver/tcpm/ps8xxx.c
@@ -487,7 +487,7 @@ static int ps8xxx_enter_low_power_mode(int port)
* its own in ~2 seconds. Other chips don't have it. Stub it out for
* PS8751.
*/
- if (IS_ENABLED(CONFIG_USB_PD_TCPM_PS8751))
+ if (product_id[port] == PS8705_PRODUCT_ID)
return EC_SUCCESS;
return tcpci_enter_low_power_mode(port);