1414#define MSP_GPIO_RESISTOR_PULL_DOWN (16)
1515#define MSP_GPIO_RESISTOR_PULL_UP (17)
1616#define MSP_GPIO_INPUT_ENABLE (18)
17+ #define MSP_GPIO_HIGH_DRIVE (20)
1718#define MSP_GPIO_HYSTERESIS_ENABLED (19)
1819#define MSP_GPIO_OPEN_DRAIN_OUTPUT (25)
1920#define MSP_GPIO_INVERSION_ENABLED (26)
2021
21- #define MSP_GPIO_HIGH_DRIVE (20)
22-
2322#define MSP_PINMUX_INIT (node_id ) DT_PROP(node_id, pinmux)
2423
25- #define MSP_PIN_CONTROL_IOMUX_INIT (node_id ) \
26- ((DT_PROP(node_id, bias_pull_up) << MSP_GPIO_RESISTOR_PULL_UP) | \
27- (DT_PROP(node_id, bias_pull_down) << MSP_GPIO_RESISTOR_PULL_DOWN) | \
28- (DT_PROP(node_id, drive_open_drain) << MSP_GPIO_OPEN_DRAIN_OUTPUT) | \
29- (DT_PROP(node_id, ti_hysteresis) << MSP_GPIO_HYSTERESIS_ENABLED) | \
30- (DT_PROP(node_id, ti_invert) << MSP_GPIO_INVERSION_ENABLED) | \
24+ #define MSP_PIN_CONTROL_IOMUX_INIT (node_id ) \
25+ ((DT_PROP(node_id, bias_pull_up) << MSP_GPIO_RESISTOR_PULL_UP) | \
26+ (DT_PROP(node_id, bias_pull_down) << MSP_GPIO_RESISTOR_PULL_DOWN) | \
27+ (DT_PROP(node_id, drive_open_drain) << MSP_GPIO_OPEN_DRAIN_OUTPUT) | \
28+ (DT_ENUM_IDX(node_id, drive_strength) << MSP_GPIO_HIGH_DRIVE) | \
29+ (DT_PROP(node_id, ti_hysteresis) << MSP_GPIO_HYSTERESIS_ENABLED) | \
30+ (DT_PROP(node_id, ti_invert) << MSP_GPIO_INVERSION_ENABLED) | \
3131 (DT_PROP(node_id, input_enable) << MSP_GPIO_INPUT_ENABLE))
3232
3333typedef struct pinctrl_soc_pin {
@@ -37,13 +37,13 @@ typedef struct pinctrl_soc_pin {
3737 uint32_t iomux ;
3838} pinctrl_soc_pin_t ;
3939
40- #define Z_PINCTRL_STATE_PIN_INIT (node_id , prop , idx ) \
41- {.pinmux = MSP_PINMUX_INIT(DT_PROP_BY_IDX(node_id, prop, idx)), \
40+ #define Z_PINCTRL_STATE_PIN_INIT (node_id , prop , idx ) \
41+ {.pinmux = MSP_PINMUX_INIT(DT_PROP_BY_IDX(node_id, prop, idx)), \
4242 .iomux = MSP_PIN_CONTROL_IOMUX_INIT(DT_PROP_BY_IDX(node_id, prop, idx))},
4343
44- #define Z_PINCTRL_STATE_PINS_INIT (node_id , prop ) \
45- { \
46- DT_FOREACH_PROP_ELEM(node_id, prop, Z_PINCTRL_STATE_PIN_INIT) \
44+ #define Z_PINCTRL_STATE_PINS_INIT (node_id , prop ) \
45+ { \
46+ DT_FOREACH_PROP_ELEM(node_id, prop, Z_PINCTRL_STATE_PIN_INIT) \
4747 }
4848
4949#endif /* __ZEPHYR_SOC_ARM_TI_MSPM0_M0G_PINCTRL_SOC_H__ */
0 commit comments