drivers: gpio_imx: add support for pin validation
Add the common config structure as a prefix of the driver-specific config structure and use the devicetree GPIO pin counts to initialize it. Not all aliases appear to be present, but using instances breaks because the ports used by different boards do not always start with the first. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
84ee7341fe
commit
d869a6c766
3 changed files with 37 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS
|
||||
|
||||
#define DT_GPIO_IMX_PORT_1_NAME DT_NXP_IMX_GPIO_30200000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_1_NGPIOS DT_NXP_IMX_GPIO_30200000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_1_BASE_ADDRESS DT_NXP_IMX_GPIO_30200000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_1_IRQ_0 DT_NXP_IMX_GPIO_30200000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_1_IRQ_0_PRI DT_NXP_IMX_GPIO_30200000_IRQ_0_PRIORITY
|
||||
|
@ -16,6 +17,7 @@
|
|||
#define DT_GPIO_IMX_PORT_1_IRQ_1_PRI DT_NXP_IMX_GPIO_30200000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_2_NAME DT_NXP_IMX_GPIO_30210000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_2_NGPIOS DT_NXP_IMX_GPIO_30210000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_2_BASE_ADDRESS DT_NXP_IMX_GPIO_30210000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_2_IRQ_0 DT_NXP_IMX_GPIO_30210000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_2_IRQ_0_PRI DT_NXP_IMX_GPIO_30210000_IRQ_0_PRIORITY
|
||||
|
@ -23,6 +25,7 @@
|
|||
#define DT_GPIO_IMX_PORT_2_IRQ_1_PRI DT_NXP_IMX_GPIO_30210000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_3_NAME DT_NXP_IMX_GPIO_30220000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_3_NGPIOS DT_NXP_IMX_GPIO_30220000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_3_BASE_ADDRESS DT_NXP_IMX_GPIO_30220000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_3_IRQ_0 DT_NXP_IMX_GPIO_30220000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_3_IRQ_0_PRI DT_NXP_IMX_GPIO_30220000_IRQ_0_PRIORITY
|
||||
|
@ -30,6 +33,7 @@
|
|||
#define DT_GPIO_IMX_PORT_3_IRQ_1_PRI DT_NXP_IMX_GPIO_30220000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_4_NAME DT_NXP_IMX_GPIO_30230000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_4_NGPIOS DT_NXP_IMX_GPIO_30230000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_4_BASE_ADDRESS DT_NXP_IMX_GPIO_30230000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_4_IRQ_0 DT_NXP_IMX_GPIO_30230000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_4_IRQ_0_PRI DT_NXP_IMX_GPIO_30230000_IRQ_0_PRIORITY
|
||||
|
@ -37,6 +41,7 @@
|
|||
#define DT_GPIO_IMX_PORT_4_IRQ_1_PRI DT_NXP_IMX_GPIO_30230000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_5_NAME DT_NXP_IMX_GPIO_30240000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_5_NGPIOS DT_NXP_IMX_GPIO_30240000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_5_BASE_ADDRESS DT_NXP_IMX_GPIO_30240000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_5_IRQ_0 DT_NXP_IMX_GPIO_30240000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_5_IRQ_0_PRI DT_NXP_IMX_GPIO_30240000_IRQ_0_PRIORITY
|
||||
|
@ -44,6 +49,7 @@
|
|||
#define DT_GPIO_IMX_PORT_5_IRQ_1_PRI DT_NXP_IMX_GPIO_30240000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_6_NAME DT_NXP_IMX_GPIO_30250000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_6_NGPIOS DT_NXP_IMX_GPIO_30250000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_6_BASE_ADDRESS DT_NXP_IMX_GPIO_30250000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_6_IRQ_0 DT_NXP_IMX_GPIO_30250000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_6_IRQ_0_PRI DT_NXP_IMX_GPIO_30250000_IRQ_0_PRIORITY
|
||||
|
@ -51,6 +57,7 @@
|
|||
#define DT_GPIO_IMX_PORT_6_IRQ_1_PRI DT_NXP_IMX_GPIO_30250000_IRQ_1_PRIORITY
|
||||
|
||||
#define DT_GPIO_IMX_PORT_7_NAME DT_NXP_IMX_GPIO_30260000_LABEL
|
||||
#define DT_GPIO_IMX_PORT_7_NGPIOS DT_NXP_IMX_GPIO_30260000_NGPIOS
|
||||
#define DT_GPIO_IMX_PORT_7_BASE_ADDRESS DT_NXP_IMX_GPIO_30260000_BASE_ADDRESS
|
||||
#define DT_GPIO_IMX_PORT_7_IRQ_0 DT_NXP_IMX_GPIO_30260000_IRQ_0
|
||||
#define DT_GPIO_IMX_PORT_7_IRQ_0_PRI DT_NXP_IMX_GPIO_30260000_IRQ_0_PRIORITY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue