drivers: gpio: Init the PINT module
Need to call PINT_Init to initialize the block before using it. This fixes the issue seen on RT600 with the button example Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
This commit is contained in:
parent
a205019910
commit
5e2e7a0fcf
|
@ -252,6 +252,7 @@ static int gpio_mcux_lpc_pin_interrupt_configure(struct device *dev,
|
|||
uint32_t port = config->port_no;
|
||||
uint32_t isr;
|
||||
uint32_t pint_idx;
|
||||
static bool pint_inited;
|
||||
|
||||
/* Ensure pin used as interrupt is set as input*/
|
||||
if ((mode & GPIO_INT_ENABLE) &&
|
||||
|
@ -296,6 +297,10 @@ static int gpio_mcux_lpc_pin_interrupt_configure(struct device *dev,
|
|||
data->pint_id[pin] = pint_idx;
|
||||
}
|
||||
|
||||
if (!pint_inited) {
|
||||
PINT_Init(config->pint_base);
|
||||
pint_inited = true;
|
||||
}
|
||||
PINT_PinInterruptConfig(config->pint_base, data->pint_id[pin],
|
||||
interruptMode,
|
||||
(pint_cb_t)gpio_mcux_lpc_port_isr);
|
||||
|
|
Loading…
Reference in a new issue