From 7ab602a8437920d04343f24cdada98a45f9ab90c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Bol=C3=ADvar?= Date: Thu, 12 Aug 2021 13:04:12 -0700 Subject: [PATCH] soc: stm32: use new DT pinctrl accessors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update to use the new APIs. Signed-off-by: Martí Bolívar --- soc/arm/st_stm32/common/st_stm32_dt.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/soc/arm/st_stm32/common/st_stm32_dt.h b/soc/arm/st_stm32/common/st_stm32_dt.h index 88b738ae52f..3b0547d1b5d 100644 --- a/soc/arm/st_stm32/common/st_stm32_dt.h +++ b/soc/arm/st_stm32/common/st_stm32_dt.h @@ -32,7 +32,7 @@ * @return elements's node identifier */ #define ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL(inst, x, i) \ - DT_INST_PHANDLE_BY_IDX(inst, pinctrl_##x, i) + DT_INST_PINCTRL_BY_IDX(inst, x, i) /** * @brief Internal: Get a node indentifier for an element in a @@ -44,7 +44,7 @@ * @return elements's node identifier */ #define ST_STM32_DT_NODE_ID_FROM_PINCTRL(name, x, i) \ - DT_PHANDLE_BY_IDX(DT_NODELABEL(name), pinctrl_##x, i) + DT_PINCTRL_BY_IDX(DT_NODELABEL(name), x, i) /** * @brief Internal: Get pinmux property of a node indentifier for an element @@ -238,7 +238,7 @@ * @param x index of targeted pinctrl- property (eg: pinctrl-) * @return number of element in property */ -#define ST_STM32_DT_INST_NUM_PINS(inst, x) DT_INST_PROP_LEN(inst, pinctrl_##x) +#define ST_STM32_DT_INST_NUM_PINS(inst, x) DT_INST_NUM_PINCTRLS_BY_IDX(inst, x) /** * @brief Internal: Return the number of elements of a pinctrl-x property @@ -252,7 +252,7 @@ * @return number of element in property */ #define ST_STM32_DT_NUM_PINS(name, x) \ - DT_PROP_LEN(DT_NODELABEL(name), pinctrl_##x) + DT_NUM_PINCTRLS_BY_IDX(DT_NODELABEL(name), x) /** * @brief Construct a soc_gpio_pinctrl array of a specific pcintrl property @@ -266,7 +266,7 @@ * @return array of soc_gpio_pinctrl */ #define ST_STM32_DT_INST_PINCTRL(inst, x) \ - { COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinctrl_##x), \ + { COND_CODE_1(DT_INST_PINCTRL_HAS_IDX(inst, x), \ (UTIL_LISTIFY(ST_STM32_DT_INST_NUM_PINS(inst, x), \ ST_STM32_DT_INST_PIN_ELEM, \ x, \ @@ -287,7 +287,7 @@ * @return array of soc_gpio_pinctrl */ #define ST_STM32_DT_PINCTRL(name, x) \ - { COND_CODE_1(DT_NODE_HAS_PROP(DT_NODELABEL(name), pinctrl_##x),\ + { COND_CODE_1(DT_PINCTRL_HAS_IDX(DT_NODELABEL(name), x), \ (UTIL_LISTIFY(ST_STM32_DT_NUM_PINS(name, x), \ ST_STM32_DT_PIN_ELEM, \ x, \