summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaveh Jalali <caveh@chromium.org>2019-07-18 02:13:46 -0700
committerCommit Bot <commit-bot@chromium.org>2019-08-07 01:31:35 +0000
commit65beadbaafc88a9c034b23fb9edee6bdcecb4f91 (patch)
tree69e3f7e50213c36a89d2e0ce27a55e642ad12f13
parent4c0a361192cca27a301c869cd406fd29843a8187 (diff)
downloadchrome-ec-65beadbaafc88a9c034b23fb9edee6bdcecb4f91.tar.gz
ps8xxx: stub out enter_low_power_mode
the ps8751 really does not behave well with explicit low power mode commands - it enters low power mode on its own in about 2 seconds, so there's really no need to command it into low power mode. when the ps8751 is awake, it will take the low power command, but also generate an alert. when we try to read the alert register, it fails because the chip is in low power mode, so we go through the normal process of waking it up, including re-initializing the chip. we then process the alert and power down the chip again. but this time around the i2c transaction for the power down command fails (we don't check this status). the reason the i2c transaction failed is very likely because the chip processed the I2CIDLE command and didn't complete the i2c transaction. BRANCH=none BUG=b:137622553 TEST=verified chip still goes to sleep on its own Change-Id: I01b864791ae27a81a4512ddb752329e59be6a8c6 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1733860 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Caveh Jalali <caveh@google.com>
-rw-r--r--driver/tcpm/ps8xxx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c
index e95a70191a..9526887b66 100644
--- a/driver/tcpm/ps8xxx.c
+++ b/driver/tcpm/ps8xxx.c
@@ -167,6 +167,12 @@ static int ps8xxx_get_chip_info(int port, int live,
return rv;
}
+#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
+static int ps8xxx_enter_low_power_mode(int port)
+{
+ return EC_SUCCESS;
+}
+#endif
const struct tcpm_drv ps8xxx_tcpm_drv = {
.init = &tcpci_tcpm_init,
@@ -196,7 +202,7 @@ const struct tcpm_drv ps8xxx_tcpm_drv = {
#endif
.get_chip_info = &ps8xxx_get_chip_info,
#ifdef CONFIG_USB_PD_TCPC_LOW_POWER
- .enter_low_power_mode = &tcpci_enter_low_power_mode,
+ .enter_low_power_mode = &ps8xxx_enter_low_power_mode,
#endif
};