Skip to content

Commit 619ccdc

Browse files
soc: stm32: use new DT pinctrl accessors
Update to use the new APIs. Signed-off-by: Martí Bolívar <[email protected]>
1 parent c3a4eaf commit 619ccdc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

soc/arm/st_stm32/common/st_stm32_dt.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @return elements's node identifier
3333
*/
3434
#define ST_STM32_DT_INST_NODE_ID_FROM_PINCTRL(inst, x, i) \
35-
DT_INST_PHANDLE_BY_IDX(inst, pinctrl_##x, i)
35+
DT_INST_PINCTRL_BY_IDX(inst, x, i)
3636

3737
/**
3838
* @brief Internal: Get a node indentifier for an element in a
@@ -44,7 +44,7 @@
4444
* @return elements's node identifier
4545
*/
4646
#define ST_STM32_DT_NODE_ID_FROM_PINCTRL(name, x, i) \
47-
DT_PHANDLE_BY_IDX(DT_NODELABEL(name), pinctrl_##x, i)
47+
DT_PINCTRL_BY_IDX(DT_NODELABEL(name), x, i)
4848

4949
/**
5050
* @brief Internal: Get pinmux property of a node indentifier for an element
@@ -238,7 +238,7 @@
238238
* @param x index of targeted pinctrl- property (eg: pinctrl-<x>)
239239
* @return number of element in property
240240
*/
241-
#define ST_STM32_DT_INST_NUM_PINS(inst, x) DT_INST_PROP_LEN(inst, pinctrl_##x)
241+
#define ST_STM32_DT_INST_NUM_PINS(inst, x) DT_INST_NUM_PINCTRLS_BY_IDX(inst, x)
242242

243243
/**
244244
* @brief Internal: Return the number of elements of a pinctrl-x property
@@ -252,7 +252,7 @@
252252
* @return number of element in property
253253
*/
254254
#define ST_STM32_DT_NUM_PINS(name, x) \
255-
DT_PROP_LEN(DT_NODELABEL(name), pinctrl_##x)
255+
DT_NUM_PINCTRLS_BY_IDX(DT_NODELABEL(name), x)
256256

257257
/**
258258
* @brief Construct a soc_gpio_pinctrl array of a specific pcintrl property
@@ -266,7 +266,7 @@
266266
* @return array of soc_gpio_pinctrl
267267
*/
268268
#define ST_STM32_DT_INST_PINCTRL(inst, x) \
269-
{ COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinctrl_##x), \
269+
{ COND_CODE_1(DT_INST_PINCTRL_HAS_IDX(inst, x), \
270270
(UTIL_LISTIFY(ST_STM32_DT_INST_NUM_PINS(inst, x), \
271271
ST_STM32_DT_INST_PIN_ELEM, \
272272
x, \
@@ -287,7 +287,7 @@
287287
* @return array of soc_gpio_pinctrl
288288
*/
289289
#define ST_STM32_DT_PINCTRL(name, x) \
290-
{ COND_CODE_1(DT_NODE_HAS_PROP(DT_NODELABEL(name), pinctrl_##x),\
290+
{ COND_CODE_1(DT_PINCTRL_HAS_IDX(DT_NODELABEL(name), x), \
291291
(UTIL_LISTIFY(ST_STM32_DT_NUM_PINS(name, x), \
292292
ST_STM32_DT_PIN_ELEM, \
293293
x, \

0 commit comments

Comments
 (0)