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

Bartosz Golaszewski
2026-03-30T08:46:40Z

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.

Bart