[PATCH 0/2] pinctrl: ocelot: fix the GPIO irqchip context handling
From: Jens Emil Schulz Østergaard
Date: Mon Nov 09 2026 - 09:02:52 EST
Two fixes for the GPIO irqchip of pinctrl-ocelot, where the irq_chip
callbacks take locks that are not allowed in the calling context.
The first makes the GPIO regmap use a raw spinlock. The callbacks run
with the raw spinlock irq_desc::lock held, where the spinlock_t of the
MMIO regmap is not allowed on PREEMPT_RT and is reported by
CONFIG_PROVE_RAW_LOCK_NESTING.
The second covers the regmap on a bus that can sleep, as for VSC7512
and lan9645x attached over SPI: the gpiochip is marked as sleeping and
the chained irqchip, whose callbacks run in atomic context, is no longer
registered.
The two patches are independent of each other. Both issues were
reproduced and the fixes tested on a lan9668 board (pcb8385), the
second with a lan9645x attached over SPI.
Signed-off-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@xxxxxxxxxxxxx>
---
Jens Emil Schulz Østergaard (2):
pinctrl: ocelot: use a raw spinlock for the GPIO regmap
pinctrl: ocelot: do not use the chained irqchip behind a sleeping bus
drivers/pinctrl/pinctrl-ocelot.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
base-commit: ff00e5c03e7efe88f7a50a8673b14e8f0d4b45bb
change-id: 20261109-ocelot-pinctrl-irqchip-fixes-74ef6d92e6f8
Best regards,
--
Jens Emil Schulz Østergaard <jensemil.schulzostergaard@xxxxxxxxxxxxx>