diff options
author | Paul Fagerburg <pfagerburg@google.com> | 2020-12-03 10:50:19 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-15 03:55:30 +0000 |
commit | b54ceb30336fe644bd6a2ad76bba05559c28c064 (patch) | |
tree | 79c891e37245604853d418e42a74a31cae5abefd | |
parent | 7ef0196dd3bf701575aba3fc6ea9bfa9f4f0d64e (diff) | |
download | chrome-ec-b54ceb30336fe644bd6a2ad76bba05559c28c064.tar.gz |
gpio_defines: add more flags for GPIO config
Add defines for GPIO_OUTPUT_LOW, GPIO_OUTPUT_HIGH, GPIO_INPUT_PULL_UP,
and GPIO_INPUT_PULL_DOWN.
BUG=b:174754428
TEST=compiles
Change-Id: Ia14505709f6667c3ba2d1f45a8974052d7c78731
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2572016
Commit-Queue: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Paul Fagerburg <pfagerburg@chromium.org>
Auto-Submit: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630150
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | zephyr/include/dt-bindings/gpio_defines.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/include/dt-bindings/gpio_defines.h b/zephyr/include/dt-bindings/gpio_defines.h index 07a499299b..37552b8d6c 100644 --- a/zephyr/include/dt-bindings/gpio_defines.h +++ b/zephyr/include/dt-bindings/gpio_defines.h @@ -32,6 +32,18 @@ /* Initializes output to a high state. */ #define GPIO_OUTPUT_INIT_HIGH (1U << 11) +/* Configures GPIO pin as output and initializes it to a low state. */ +#define GPIO_OUTPUT_LOW (GPIO_OUTPUT | GPIO_OUTPUT_INIT_LOW) + +/* Configures GPIO pin as output and initializes it to a high state. */ +#define GPIO_OUTPUT_HIGH (GPIO_OUTPUT | GPIO_OUTPUT_INIT_HIGH) + +/* Configures GPIO pin as input with pull-up. */ +#define GPIO_INPUT_PULL_UP (GPIO_INPUT | GPIO_PULL_UP) + +/* Configures GPIO pin as input with pull-down. */ +#define GPIO_INPUT_PULL_DOWN (GPIO_INPUT | GPIO_PULL_DOWN) + /** Configures GPIO pin as output and initializes it to a low state. */ #define GPIO_OUT_LOW (GPIO_OUTPUT | GPIO_OUTPUT_INIT_LOW) |