|
32 | 32 | * @return elements's node identifier |
33 | 33 | */ |
34 | 34 | #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) |
36 | 36 |
|
37 | 37 | /** |
38 | 38 | * @brief Internal: Get a node indentifier for an element in a |
|
44 | 44 | * @return elements's node identifier |
45 | 45 | */ |
46 | 46 | #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) |
48 | 48 |
|
49 | 49 | /** |
50 | 50 | * @brief Internal: Get pinmux property of a node indentifier for an element |
|
238 | 238 | * @param x index of targeted pinctrl- property (eg: pinctrl-<x>) |
239 | 239 | * @return number of element in property |
240 | 240 | */ |
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) |
242 | 242 |
|
243 | 243 | /** |
244 | 244 | * @brief Internal: Return the number of elements of a pinctrl-x property |
|
252 | 252 | * @return number of element in property |
253 | 253 | */ |
254 | 254 | #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) |
256 | 256 |
|
257 | 257 | /** |
258 | 258 | * @brief Construct a soc_gpio_pinctrl array of a specific pcintrl property |
|
266 | 266 | * @return array of soc_gpio_pinctrl |
267 | 267 | */ |
268 | 268 | #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), \ |
270 | 270 | (UTIL_LISTIFY(ST_STM32_DT_INST_NUM_PINS(inst, x), \ |
271 | 271 | ST_STM32_DT_INST_PIN_ELEM, \ |
272 | 272 | x, \ |
|
287 | 287 | * @return array of soc_gpio_pinctrl |
288 | 288 | */ |
289 | 289 | #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), \ |
291 | 291 | (UTIL_LISTIFY(ST_STM32_DT_NUM_PINS(name, x), \ |
292 | 292 | ST_STM32_DT_PIN_ELEM, \ |
293 | 293 | x, \ |
|
0 commit comments