summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/gpio.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-01-14 17:25:22 -0700
committerCommit Bot <commit-bot@chromium.org>2021-01-15 18:47:57 +0000
commit3fdb8f8e0b68b8035984fa74bc8d99909d2f93a1 (patch)
tree2f837c3d39fd2d666118d25582336bc33edd0d96 /zephyr/shim/src/gpio.c
parentd806a60f81873977836965b361b253830c2b9add (diff)
downloadchrome-ec-3fdb8f8e0b68b8035984fa74bc8d99909d2f93a1.tar.gz
zephyr: implement gpio_set_level_verbose shim
Implement gpio_set_level_verbose in the shim layer. BUG=none BRANCH=none TEST=volteer compiles with CONFIG_BRINGUP Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5a701aecbb1d8c9d9bf665bfbc67b0a5d34bf5d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631352 Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/shim/src/gpio.c')
-rw-r--r--zephyr/shim/src/gpio.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/zephyr/shim/src/gpio.c b/zephyr/shim/src/gpio.c
index fe2b5130b0..99be7ba6a9 100644
--- a/zephyr/shim/src/gpio.c
+++ b/zephyr/shim/src/gpio.c
@@ -167,6 +167,13 @@ void gpio_set_level(enum gpio_signal signal, int value)
}
}
+void gpio_set_level_verbose(enum console_channel channel,
+ enum gpio_signal signal, int value)
+{
+ cprints(channel, "Set %s: %d", gpio_get_name(signal), value);
+ gpio_set_level(signal, value);
+}
+
/* GPIO flags which are the same in Zephyr and this codebase */
#define GPIO_CONVERSION_SAME_BITS \
(GPIO_OPEN_DRAIN | GPIO_PULL_UP | GPIO_PULL_DOWN | GPIO_INPUT | \