Re: [PATCH v3] pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown
From: Michal Piekos
Date: Sat Mar 14 2026 - 04:46:48 EST
On Sat, Mar 14, 2026 at 04:23:11PM +0800, Chen-Yu Tsai wrote:
> On Sat, Mar 14, 2026 at 4:10 PM Michal Piekos
> <michal.piekos@xxxxxxxxxxxxx> wrote:
> >
> > Fixes kernel hang during boot due to inability to set up IRQ on AXP313a.
> >
> > The issue is caused by gpiochip_lock_as_irq() which is failing when gpio
> > is in unitialized state.
> >
> > Solution is to set pinmux to GPIO INPUT in
> > sunxi_pinctrl_irq_request_resources() if it wasn't initialized
> > earlier.
> >
> > Tested on Orange Pi Zero 3.
> >
> > Signed-off-by: Michal Piekos <michal.piekos@xxxxxxxxxxxxx>
> > Suggested-by: Chen-Yu Tsai <wens@xxxxxxxxxx>
>
> Interesting solution, not at all what I had in mind. :D
> This fixes things immediately for sunxi, and keeps proper pin lockout,
> i.e. one can't use a pin muxed for other uses as a GPIO interrupt pin.
> I was hoping that the maintainers could provide some guidance as to
> whether the core could provide helpers for this, but for now:
>
> Reviewed-by: Chen-Yu Tsai <wens@xxxxxxxxxx>
Thank you.