diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-02-04 10:22:37 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-02-06 00:09:21 +0000 |
commit | 7da0c93d6d99e79d17f56ae18e41a8572148358f (patch) | |
tree | 1e45b0b2847d47e94eedb6c85f20282a4c62f1d8 | |
parent | ec9f5592b4448bf91369a6eedfc16758c6cfb297 (diff) | |
download | chrome-ec-7da0c93d6d99e79d17f56ae18e41a8572148358f.tar.gz |
ps8xxx: Set I2CIDLE command to enter low power mode for ps8805/ps8815
PS8751 has the auto sleep function that enters low power mode on its own
in ~2 seconds. But PS8805/PS8815 doesn't have this function. Need to
explicitly set the I2CIDLE command, which is implemented in the tcpci
driver.
BRANCH=None
BUG=b:147302697
TEST=Checked the TCPC enter low power mode, that uses less power.
TEST=Checked PD negotiaion: sinking power, sourcing power, DP dongle.
Change-Id: I9cc9d0a1b8081a8142728f74183bd910614e74b5
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2037135
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | driver/tcpm/ps8xxx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index aeef8cd6e4..ba4a8e324e 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -179,7 +179,15 @@ static int ps8xxx_get_chip_info(int port, int live, #ifdef CONFIG_USB_PD_TCPC_LOW_POWER static int ps8xxx_enter_low_power_mode(int port) { - return EC_SUCCESS; + /* + * PS8751 has the auto sleep function that enters low power mode on + * its own in ~2 seconds. Other chips don't have it. Stub it out for + * PS8751. + */ + if (IS_ENABLED(CONFIG_USB_PD_TCPM_PS8751)) + return EC_SUCCESS; + + return tcpci_enter_low_power_mode(port); } #endif |