diff options
author | Keith Short <keithshort@chromium.org> | 2022-02-10 16:48:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-02-25 21:10:15 +0000 |
commit | c555168cf63c9b8a49b783c9d410dfeb632e0601 (patch) | |
tree | c538ec7e255921da881903b71cf154fda21aafeb | |
parent | 3ba28b0c41e898d03afcc9432f812fa8e5a9524a (diff) | |
download | chrome-ec-c555168cf63c9b8a49b783c9d410dfeb632e0601.tar.gz |
zephyr: Move gpio_get_dt_spec prototype
Move the gpio_get_dt_spec() prototype into a Zephyr specific file. This
allows code under platform/ec/zephyr to avoid including the legacy
gpio.h, which has duplicate GPIO flag definitions.
BUG=b:218856245
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I1390dd1bc7ce3ee81f258cf6aa741e706ff08c8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489102
Reviewed-by: Aaron Massey <aaronmassey@google.com>
-rw-r--r-- | include/gpio.h | 9 | ||||
-rw-r--r-- | zephyr/shim/include/zephyr_gpio_signal.h | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/gpio.h b/include/gpio.h index c854b4f42c..5a41c7ea88 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -271,15 +271,6 @@ int convert_from_zephyr_flags(const gpio_flags_t zephyr); */ gpio_flags_t convert_to_zephyr_flags(int ec_flags); -/** - * Obtain the gpio_dt_spec structure associated with - * this gpio signal. - * - * @param signal GPIO signal to get gpio_dt_spec for - * @returns gpio_dt_spec associated with signal, or 0 if invalid - */ -const struct gpio_dt_spec *gpio_get_dt_spec(enum gpio_signal signal); - #endif /** diff --git a/zephyr/shim/include/zephyr_gpio_signal.h b/zephyr/shim/include/zephyr_gpio_signal.h index a7b7aeba96..6522224456 100644 --- a/zephyr/shim/include/zephyr_gpio_signal.h +++ b/zephyr/shim/include/zephyr_gpio_signal.h @@ -155,4 +155,13 @@ enum ioexpander_id { CONFIG_IO_EXPANDER_PORT_COUNT }; +/** + * Obtain the gpio_dt_spec structure associated with + * this gpio signal. + * + * @param signal GPIO signal to get gpio_dt_spec for + * @returns gpio_dt_spec associated with signal, or 0 if invalid + */ +const struct gpio_dt_spec *gpio_get_dt_spec(enum gpio_signal signal); + #undef IOEXPANDER_ID_FROM_INST_WITH_COMMA |