[PATCH v2] pinctrl: sunxi: Implement gpiochip::get_direction()
Chen-Yu Tsai
wens at kernel.org
Tue Mar 10 05:03:37 PDT 2026
On Tue, Mar 10, 2026 at 7:46 PM Linus Walleij <linusw at kernel.org> wrote:
>
> On Sun, Mar 8, 2026 at 10:34 AM Michal Piekos
> <michal.piekos at mmpsystems.pl> wrote:
> > On Tue, Feb 24, 2026 at 10:52:23AM +0100, Linus Walleij wrote:
> > > On Tue, Feb 24, 2026 at 10:24 AM Chen-Yu Tsai <wens at kernel.org> wrote:
> > >
> > > > After commit 471e998c0e31 ("gpiolib: remove redundant callback check"),
> > > > a warning will be printed if the gpio driver does not implement this
> > > > callback. The warning was added in commit e623c4303ed1 ("gpiolib:
> > > > sanitize the return value of gpio_chip::get_direction()"), but was
> > > > masked by the "redundant" check.
> > > >
> > > > The warning can be triggered by any action that calls the callback,
> > > > such as dumping the GPIO state from /sys/kernel/debug/gpio.
> > > >
> > > > Implement it for the sunxi driver. This is simply a matter of reading
> > > > out the mux value from the registers, then checking if it is one of
> > > > the GPIO functions and which direction it is.
> > > >
> > > > Signed-off-by: Chen-Yu Tsai <wens at kernel.org>
> > > > Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
> > > > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski at oss.qualcomm.com>
> > >
> > > Pulled out v1 of my tree and put in this one instead!
> > >
> >
> > Please do not merge the correction yet. As I was pointed out by Jernej
> > Skrabec the solution is faulty and just cover the issue. I will provide
> > proper solution as soon as I find it.
>
> Too late, this is already upstream and I think that is how it was detected.
> Shall I queue a revert?
Michal sent a v2 fix [1]. It's more of a workaround though. See my reply [2].
[1] https://lore.kernel.org/linux-sunxi/20260308-rc2-boot-hang-v2-1-516fdb820953@mmpsystems.pl/
[2] https://lore.kernel.org/linux-sunxi/CAGb2v67FO1bt3yee2SXn1LTt7O10z1EHHw7F0xQ0bKbpUqch4w@mail.gmail.com/
More information about the linux-arm-kernel
mailing list