soc/arm: stm32: swap argument order in ST_STM32 PINCTRL macros
In order to be in line with other DT_INST macros in zephyr code base, swap the arguments order in following macro definitions: *ST_STM32_DT_PINCTRL *ST_STM32_DT_INST_PINCTRL Update the users accordingly. Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
parent
b38d84fef4
commit
b74a2162cb
4 changed files with 7 additions and 7 deletions
|
@ -352,7 +352,7 @@ STM32_I2C_IRQ_HANDLER_DECL(name); \
|
||||||
DEFINE_TIMINGS(name) \
|
DEFINE_TIMINGS(name) \
|
||||||
\
|
\
|
||||||
static const struct soc_gpio_pinctrl i2c_pins_##name[] = \
|
static const struct soc_gpio_pinctrl i2c_pins_##name[] = \
|
||||||
ST_STM32_DT_PINCTRL(0, name); \
|
ST_STM32_DT_PINCTRL(name, 0); \
|
||||||
\
|
\
|
||||||
static const struct i2c_stm32_config i2c_stm32_cfg_##name = { \
|
static const struct i2c_stm32_config i2c_stm32_cfg_##name = { \
|
||||||
.i2c = (I2C_TypeDef *)DT_REG_ADDR(DT_NODELABEL(name)), \
|
.i2c = (I2C_TypeDef *)DT_REG_ADDR(DT_NODELABEL(name)), \
|
||||||
|
|
|
@ -461,7 +461,7 @@ static int pwm_stm32_init(const struct device *dev)
|
||||||
static struct pwm_stm32_data pwm_stm32_data_##index; \
|
static struct pwm_stm32_data pwm_stm32_data_##index; \
|
||||||
\
|
\
|
||||||
static const struct soc_gpio_pinctrl pwm_pins_##index[] = \
|
static const struct soc_gpio_pinctrl pwm_pins_##index[] = \
|
||||||
ST_STM32_DT_INST_PINCTRL(0, index); \
|
ST_STM32_DT_INST_PINCTRL(index, 0); \
|
||||||
\
|
\
|
||||||
static const struct pwm_stm32_config pwm_stm32_config_##index = { \
|
static const struct pwm_stm32_config pwm_stm32_config_##index = { \
|
||||||
.timer = (TIM_TypeDef *)DT_REG_ADDR( \
|
.timer = (TIM_TypeDef *)DT_REG_ADDR( \
|
||||||
|
|
|
@ -815,7 +815,7 @@ static void uart_stm32_irq_config_func_##index(const struct device *dev) \
|
||||||
STM32_UART_IRQ_HANDLER_DECL(index); \
|
STM32_UART_IRQ_HANDLER_DECL(index); \
|
||||||
\
|
\
|
||||||
static const struct soc_gpio_pinctrl uart_pins_##index[] = \
|
static const struct soc_gpio_pinctrl uart_pins_##index[] = \
|
||||||
ST_STM32_DT_INST_PINCTRL(0, index); \
|
ST_STM32_DT_INST_PINCTRL(index, 0); \
|
||||||
\
|
\
|
||||||
static const struct uart_stm32_config uart_stm32_cfg_##index = { \
|
static const struct uart_stm32_config uart_stm32_cfg_##index = { \
|
||||||
.uconf = { \
|
.uconf = { \
|
||||||
|
|
|
@ -261,11 +261,11 @@
|
||||||
* This macro returns an array of soc_gpio_pinctrl, each line matching a pinctrl
|
* This macro returns an array of soc_gpio_pinctrl, each line matching a pinctrl
|
||||||
* configuration provived in property pcintrl-<x> of device instance <inst>
|
* configuration provived in property pcintrl-<x> of device instance <inst>
|
||||||
*
|
*
|
||||||
* @param x index of targeted pinctrl- property (eg: pinctrl-<x>)
|
|
||||||
* @param inst device instance number
|
* @param inst device instance number
|
||||||
|
* @param x index of targeted pinctrl- property (eg: pinctrl-<x>)
|
||||||
* @return array of soc_gpio_pinctrl
|
* @return array of soc_gpio_pinctrl
|
||||||
*/
|
*/
|
||||||
#define ST_STM32_DT_INST_PINCTRL(x, inst) \
|
#define ST_STM32_DT_INST_PINCTRL(inst, x) \
|
||||||
{ COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinctrl_##x), \
|
{ COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinctrl_##x), \
|
||||||
(UTIL_LISTIFY(ST_STM32_DT_INST_NUM_PINS(inst, x), \
|
(UTIL_LISTIFY(ST_STM32_DT_INST_NUM_PINS(inst, x), \
|
||||||
ST_STM32_DT_INST_PIN_ELEM, \
|
ST_STM32_DT_INST_PIN_ELEM, \
|
||||||
|
@ -282,11 +282,11 @@
|
||||||
* configuration provived in property pcintrl-<x> of a device referenced by
|
* configuration provived in property pcintrl-<x> of a device referenced by
|
||||||
* its node label identifier.
|
* its node label identifier.
|
||||||
*
|
*
|
||||||
* @param x index of targeted pinctrl- property (eg: pinctrl-<x>)
|
|
||||||
* @param name device node label identifier
|
* @param name device node label identifier
|
||||||
|
* @param x index of targeted pinctrl- property (eg: pinctrl-<x>)
|
||||||
* @return array of soc_gpio_pinctrl
|
* @return array of soc_gpio_pinctrl
|
||||||
*/
|
*/
|
||||||
#define ST_STM32_DT_PINCTRL(x, name) \
|
#define ST_STM32_DT_PINCTRL(name, x) \
|
||||||
{ COND_CODE_1(DT_NODE_HAS_PROP(DT_NODELABEL(name), pinctrl_##x),\
|
{ COND_CODE_1(DT_NODE_HAS_PROP(DT_NODELABEL(name), pinctrl_##x),\
|
||||||
(UTIL_LISTIFY(ST_STM32_DT_NUM_PINS(name, x), \
|
(UTIL_LISTIFY(ST_STM32_DT_NUM_PINS(name, x), \
|
||||||
ST_STM32_DT_PIN_ELEM, \
|
ST_STM32_DT_PIN_ELEM, \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue