Skip to content

Commit 47d6f02

Browse files
JiafeiPandkalowsk
authored andcommitted
drivers: gpio: rgpio: only handle usable pin's interrupt
If gpio-reserved-ranges to reserve some pins which used by other CPU Core's OS, we could only handle usable pins owned by current CPU Core in interrupt handler. Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
1 parent 72a009c commit 47d6f02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpio/gpio_mcux_rgpio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,12 @@ static int mcux_rgpio_manage_callback(const struct device *dev,
273273
static void mcux_rgpio_port_isr(const struct device *dev)
274274
{
275275
RGPIO_Type *base = (RGPIO_Type *)DEVICE_MMIO_NAMED_GET(dev, reg_base);
276+
const struct mcux_rgpio_config *config = dev->config;
276277
struct mcux_rgpio_data *data = dev->data;
277278
uint32_t int_flags;
278279

279280
int_flags = base->ISFR[0]; /* Notice: only irq0 is used for now */
281+
int_flags &= config->common.port_pin_mask; /* don't handle unusable pin */
280282
base->ISFR[0] = int_flags;
281283

282284
gpio_fire_callbacks(&data->callbacks, dev, int_flags);

0 commit comments

Comments
 (0)