]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown
authorMichal Piekos <michal.piekos@mmpsystems.pl>
Fri, 20 Mar 2026 17:52:31 +0000 (18:52 +0100)
committerLinus Walleij <linusw@kernel.org>
Mon, 23 Mar 2026 13:23:09 +0000 (14:23 +0100)
commit70f8915ea4e909826306a8567c7fa46959e278db
tree42e93ff1b6bc5635390679ef7ade7cc2dea9369d
parent42e06688c6cb7217578133bed67e9e3c1f061a58
pinctrl: sunxi: fix gpiochip_lock_as_irq() failure when pinmux is unknown

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 uninitialized 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.

Fixes: 01e10d0272b9 ("pinctrl: sunxi: Implement gpiochip::get_direction()")
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Signed-off-by: Michal Piekos <michal.piekos@mmpsystems.pl>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/sunxi/pinctrl-sunxi.c
drivers/pinctrl/sunxi/pinctrl-sunxi.h