summaryrefslogtreecommitdiff
path: root/include/gpio.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-08-22 03:15:52 +0100
committerGerrit <chrome-bot@google.com>2012-08-27 12:16:10 -0700
commit130531ab8ca916de4934315264353bfbfcda7871 (patch)
tree16cc033d0e40d7085f65119b6a0df1e81e55e8d3 /include/gpio.h
parentecd4e1b5d6cc0530b3416ce626b4665ec298e4e4 (diff)
downloadchrome-ec-130531ab8ca916de4934315264353bfbfcda7871.tar.gz
Allow GPIOs to be set up later
At present GPIOs must be staticly defined in a table. This is efficient but inflexible, and requires error-prone and correponding #ifdefs both in the board's gpio.h and gpio.c files. Create a GPIO_UNSET option for GPIOs. This allows them to be assigned an enum value, but have the actual use under program control. BUG=chrome-os-partner:13064 BRANCH=snow,link TEST=manual build and boot on snow with later changes. See the AC power GPIO does not change when un/plugging power. Change-Id: Iab58275923d7d6cfce62c890b5db9b6758279a4c Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/31302 Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r--include/gpio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gpio.h b/include/gpio.h
index e03acfb0c9..0007e07cfa 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -25,7 +25,7 @@
#define GPIO_INT_BOTH 0x0040 /* Interrupt on both edges */
#define GPIO_INT_LOW 0x0080 /* Interrupt on low level */
#define GPIO_INT_HIGH 0x0100 /* Interrupt on high level */
-
+#define GPIO_DEFAULT 0x0200 /* Don't set up on boot */
/* Common flag combinations */
#define GPIO_OUT_LOW GPIO_OUTPUT