From b7792695c5120a488c8eec5a734716fe2942838a Mon Sep 17 00:00:00 2001 From: Aaron Massey Date: Tue, 19 Jul 2022 10:23:35 -0600 Subject: 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 Change-Id: I8af3f21dbf5b8ab05cd1c1d9cfc483fa3c25b850 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3773935 Reviewed-by: Tristan Honscheid Reviewed-by: Jack Rosenthal --- zephyr/shim/include/gpio/gpio.h | 4 ++-- 1 file 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), \ -- cgit v1.2.1