drivers: pinctrl: pinctrl_kinetis: Fix port array
Fix port array definition in kinetis pinctrl driver so that it handles more flexibly the cases where the number of PORT peripherals is more than 3, rather than only handling the case where there are 5. Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
parent
f7f47dc437
commit
3af095b122
|
@ -15,8 +15,10 @@ static PORT_Type *ports[] = {
|
|||
(PORT_Type *)DT_REG_ADDR(DT_NODELABEL(porta)),
|
||||
(PORT_Type *)DT_REG_ADDR(DT_NODELABEL(portb)),
|
||||
(PORT_Type *)DT_REG_ADDR(DT_NODELABEL(portc)),
|
||||
#if DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) == 5
|
||||
#if DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) > 3
|
||||
(PORT_Type *)DT_REG_ADDR(DT_NODELABEL(portd)),
|
||||
#endif
|
||||
#if DT_NUM_INST_STATUS_OKAY(DT_DRV_COMPAT) > 4
|
||||
(PORT_Type *)DT_REG_ADDR(DT_NODELABEL(porte)),
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue