diff options
author | Aaron Massey <aaronmassey@google.com> | 2022-07-19 10:23:35 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-19 18:01:42 +0000 |
commit | b7792695c5120a488c8eec5a734716fe2942838a (patch) | |
tree | 6f5a9efd86cee6655eefe6adc9ea617f8d315ae2 /zephyr/shim/include | |
parent | 7ae9a8daffde9b5451dff964646323a6aa9a0f9a (diff) | |
download | chrome-ec-b7792695c5120a488c8eec5a734716fe2942838a.tar.gz |
zephyr: Remove DT_GPIO_LABEL_BY_IDX usage
Zephyr upstream deprecated the DT_GPIO_LABEL_BY_IDX macro used by
downstream UNUSED_GPIO_CONFIG_BY_IDX macro causing a CQ build failure
and blocking Zephyr downstreaming.
Replace use of DT_GPIO_LABEL_BY_IDX with DT_GPIO_CTLR_BY_IDX. Note: This
change also includes a switch from using DT_LABEL to DEVICE_DT_NAME
which is less likely to be deprecated and evaluates to the same result
if a LABEL property is present.
BRANCH=none
BUG=b:239447869
TEST=zmake test build -a # With breaking commit in downstreamed Zephyr
Signed-off-by: Aaron Massey <aaronmassey@google.com>
Change-Id: I8af3f21dbf5b8ab05cd1c1d9cfc483fa3c25b850
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773935
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/include')
-rw-r--r-- | zephyr/shim/include/gpio/gpio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zephyr/shim/include/gpio/gpio.h b/zephyr/shim/include/gpio/gpio.h index 6f92ed5795..cae87ec859 100644 --- a/zephyr/shim/include/gpio/gpio.h +++ b/zephyr/shim/include/gpio/gpio.h @@ -74,8 +74,8 @@ int gpio_config_unused_pins(void) __attribute__((weak)); */ #define UNUSED_GPIO_CONFIG_BY_IDX(i, _) \ { \ - .dev_name = DT_GPIO_LABEL_BY_IDX(UNUSED_PINS_LIST, \ - unused_gpios, i), \ + .dev_name = DEVICE_DT_NAME(DT_GPIO_CTLR_BY_IDX( \ + UNUSED_PINS_LIST, unused_gpios, i)), \ .pin = DT_GPIO_PIN_BY_IDX(UNUSED_PINS_LIST, unused_gpios, i), \ .flags = DT_GPIO_FLAGS_BY_IDX(UNUSED_PINS_LIST, unused_gpios, \ i), \ |