Re: [PATCH] mfd: si476x: Modernize GPIO handling

Linus Walleij
2026-03-30T08:59:49Z

On Mon, Mar 30, 2026 at 10:46 AM Bartosz Golaszewski <brgl@kernel.org> wrote:
> On Fri, 27 Mar 2026 09:37:26 +0100, Linus Walleij <linusw@kernel.org> said:
> > The SI476X driver depends on the legacy GPIO API. As it only
> > really use a single GPIO for reset, and this can be easily converted
> > to use a GPIO descriptor, modernize the driver.
> >
> > The "reset" GPIO is obtained from a device property, such as a
> > device tree ("reset-gpios", which is standard, but this hardware has
> > no DT bindings as of now) or a software node for static platforms.
> >
> > Out-of-tree users can easily adopt to providing a GPIO descriptor
> > this way.
> >
> > Signed-off-by: Linus Walleij <linusw@kernel.org>
> > ---
>
> You could probably simplify it even more by using the reset-gpio driver which
> allows you to use reset control APIs with the "reset-gpios" property. It fiddles
> with GPIOs behind the scenes while you just assert/deassert the reset.

Yeah... but I don't feel confident doing that without the hardware to
test on. This conversion is pretty straight-forward.

If someone appears that can actually test this one patch I can take
a stab at converting it to reset control as well.

Yours,
Linus Walleij