summaryrefslogtreecommitdiff
path: root/include/gpio.h
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2019-10-30 10:45:46 -0700
committerCommit Bot <commit-bot@chromium.org>2019-11-08 22:58:53 +0000
commitfe21ab18622825f2a402b970cfec50e429cc14f5 (patch)
treee606642079549f53df12ab7ddea63c04ef5d17a2 /include/gpio.h
parent551c8736317a3bd6eb9f8c95540af67e60969716 (diff)
downloadchrome-ec-fe21ab18622825f2a402b970cfec50e429cc14f5.tar.gz
gpio: Add UNUSED declaration for gpio.inc
This new gpio.inc macro is intended to mark pins that are unused on a given board. This allows the chip implementation to configure them for the lowest power configuration. This CL brings immediate functional change. A reference implementation is provided for the STM32F4 chip family in crrev.com/c/1894242. BRANCH=nocturne,hatch BUG=b:130561737 TEST=make buildall -j Change-Id: I0bc0a63401ae8f3bba4108b5b9f9ced26785f2bc Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1898796 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/gpio.h')
-rw-r--r--include/gpio.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h
index 3b1763ae9d..61329ad758 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -99,6 +99,19 @@ struct gpio_info {
/* Signal information from board.c. Must match order from enum gpio_signal. */
extern const struct gpio_info gpio_list[];
+/* Unused pin definition structure. */
+struct unused_pin_info {
+ /* Port base address */
+ uint32_t port;
+
+ /* Bitmask on that port (1 << N) */
+ uint32_t mask;
+};
+
+/* Unused pin information. */
+extern const struct unused_pin_info unused_pin_list[];
+extern const int unused_pin_count;
+
/* Interrupt handler table for those GPIOs which have IRQ handlers.
*
* If the signal's interrupt is enabled, this will be called in the