diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2018-08-02 16:07:36 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-03 13:37:24 -0700 |
commit | 6a664f995c6c637023874a56e6bdbadf4259a857 (patch) | |
tree | a73fbe08b471f602cfaac4d1adc42d8b4d004f87 /chip/it83xx/clock.c | |
parent | 7ceca8cd1e661359cff4cfbdaf6b05ef7171b060 (diff) | |
download | chrome-ec-6a664f995c6c637023874a56e6bdbadf4259a857.tar.gz |
it83xx/tcpm: disable integrated pd module in hibernate
With this change, we will have better power number in hibernate.
BUG=b:111006203
BRANCH=none
TEST=reduce power consumption about ~2mW in hibernate.
Change-Id: Ia310801543bac9417e370ede6f820c297ae2f734
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/1158309
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/it83xx/clock.c')
-rw-r--r-- | chip/it83xx/clock.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chip/it83xx/clock.c b/chip/it83xx/clock.c index 7d1a09d5fe..b10a31d19f 100644 --- a/chip/it83xx/clock.c +++ b/chip/it83xx/clock.c @@ -13,6 +13,7 @@ #include "hwtimer_chip.h" #include "intc.h" #include "irq_chip.h" +#include "it83xx_pd.h" #include "registers.h" #include "system.h" #include "task.h" @@ -413,6 +414,15 @@ void __enter_hibernate(uint32_t seconds, uint32_t microseconds) ext_timer_start(FREE_EXT_TIMER_L, 0); } +#ifdef CONFIG_USB_PD_TCPM_ITE83XX + /* + * Disable integrated pd modules in hibernate for + * better power consumption. + */ + for (i = 0; i < USBPD_PORT_COUNT; i++) + it83xx_disable_pd_module(i); +#endif + for (i = 0; i < hibernate_wake_pins_used; ++i) gpio_enable_interrupt(hibernate_wake_pins[i]); |