diff options
author | Alec Berg <alecaberg@chromium.org> | 2013-10-14 17:55:42 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-21 23:59:38 +0000 |
commit | 10bd1db6d73e21619e789d73c8233dea2c493510 (patch) | |
tree | dfc03ce44ce9ef3697cb707d2f160861697628b4 /include/gpio.h | |
parent | 1d6687429c1ea236bf09ac32d4936888a36730e6 (diff) | |
download | chrome-ec-10bd1db6d73e21619e789d73c8233dea2c493510.tar.gz |
lm4: Use low speed clock in deep sleep.
Changed the low power idle task to use the low speed clock in deep
sleep. The low power idle task is currently only enabled for Peppy,
Slippy, and Falco. This change decreases power consumption when
the AP is not running.
Note that the low speed clock is slow enough that the JTAG cannot be
used and the EC console UART cannot be used. To work around that,
this commit detects when the JTAG is in use and when the EC console
is in use, and will not use the low speed clock if either is in use.
The JTAG in use never clears after being set and the console in use
clears after a fixed timeout period.
BUG=None
BRANCH=None
TEST=Passes all unit tests.
Tested that the EC console works when in deep sleep.
Tested that it is possible to run flash_ec when in deep sleep and
using the low speed clock.
Change-Id: Ia65997eb8e607a5df9b2c7d68e4826bfb1e0194c
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173326
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r-- | include/gpio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h index bdedbf4bb7..fc46e995ce 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -169,6 +169,18 @@ void gpio_set_level(enum gpio_signal signal, int value); int gpio_enable_interrupt(enum gpio_signal signal); /** + * Disable interrupts for the signal. + * + * The signal must have been defined with + * an interrupt handler. Normally called by the module which handles the + * interrupt, if it doesn't want to process interrupts. + * + * @param signal Signal to disable interrupts for + * @return EC_SUCCESS, or non-zero if error. + */ +int gpio_disable_interrupt(enum gpio_signal signal); + +/** * Set flags for GPIO(s) by port and mask. * * Use gpio_set_flags() to set flags for an individual GPIO by id. |