Re: [PATCH] pinctrl: sunxi: a733: do not switch the mux to read IRQ lines

From: Linus Walleij

Date: Wed Nov 25 2026 - 08:52:24 EST


On Tue, Nov 10, 2026 at 2:02 PM Vinicius Pedrosa
<vinicius.eduardo.pedrosa@xxxxxxxxx> wrote:

> The A733 description sets irq_read_needs_mux. When a GPIO used as an
> interrupt is read, sunxi_pinctrl_gpio_get() then switches the pin to
> input and back to SUN4I_FUNC_IRQ, which is function 6. The A733
> interrupt function is 14, so after the first read the pin is left on
> function 6 and its interrupt no longer fires.
>
> On my board this breaks microSD card detection: the PF6
> card-detect line is read at probe, and after that neither removal nor
> insertion of the card is noticed.
>
> The A733 data register reports the pin level while the pin is muxed
> to the interrupt function, so the switch is not needed. The A523 and
> D1 descriptions do not set this flag either. Drop it.
>
> Fixes: 0535bfbfa97b ("pinctrl: sunxi: add support for the Allwinner A733")
> Signed-off-by: Vinicius Pedrosa <vinicius.eduardo.pedrosa@xxxxxxxxx>

Patch applied for fixes, sorry for the delay.

Yours,
Linus Walleij