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

From: Bartosz Golaszewski

Date: Mon Mar 30 2026 - 04:52:11 EST


On Fri, 27 Mar 2026 09:37:26 +0100, Linus Walleij <linusw@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---

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