summaryrefslogtreecommitdiff
path: root/include/gpio.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2013-10-08 16:46:58 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-10 23:14:20 +0000
commit27e063ea100086a913ed655b611c88e077de5b00 (patch)
tree701999fd9367e30d008179243a0fc95fc51c5175 /include/gpio.h
parentf7e69a211ce0121ec06c79f6d82574d3347dec2f (diff)
downloadchrome-ec-27e063ea100086a913ed655b611c88e077de5b00.tar.gz
lm4: Modified clock gating to allow easy expansion to low power.
Created a new function to enable or disable clocks to various peripherals. This new function makes it easy to specify if you want the clock enabled in run mode, sleep mode, and/or deep sleep mode. Added infrastructure to specify which GPIOs should interrupt the EC from deep sleep. BUG=none BRANCH=none TEST=Passes all unit tests. Ran on a peppy and verified that the clock gate control registers in run mode (LM4_RCGC regs) were the same before and after this change. Change-Id: Ia5009ac8c837f61dca52fe86ebdeede2e1a7fe4d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/172454 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r--include/gpio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h
index ac25ee8d39..bdedbf4bb7 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -28,6 +28,7 @@
#define GPIO_INT_F_LOW (1 << 11) /* Interrupt on low level */
#define GPIO_INT_F_HIGH (1 << 12) /* Interrupt on high level */
#define GPIO_DEFAULT (1 << 13) /* Don't set up on boot */
+#define GPIO_INT_DSLEEP (1 << 14) /* Interrupt in deep sleep */
/* Common flag combinations */
#define GPIO_OUT_LOW (GPIO_OUTPUT | GPIO_LOW)
@@ -42,6 +43,7 @@
#define GPIO_INT_EDGE (GPIO_INT_RISING | GPIO_INT_FALLING | GPIO_INT_BOTH)
#define GPIO_INT_LEVEL (GPIO_INT_LOW | GPIO_INT_HIGH)
#define GPIO_INT_ANY (GPIO_INT_EDGE | GPIO_INT_LEVEL)
+#define GPIO_INT_BOTH_DSLEEP (GPIO_INT_BOTH | GPIO_INT_DSLEEP)
/* GPIO signal definition structure, for use by board.c */
struct gpio_info {