Re: [PATCH 3/7] ASoC: codec: twl4030: Convert to GPIO descriptors

From: Linus Walleij
Date: Tue Apr 15 2025 - 09:28:56 EST


On Tue, Apr 8, 2025 at 3:41 AM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> wrote:

> From: Peng Fan <peng.fan@xxxxxxx>
>
> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
> - Use of_property_present to check "ti,hs_extmute_gpio" to set hs_extmute
> - if returned value is true.
> - Use devm_gpiod_get_optional to get GPIO descriptor, set consumer name.
> - Use gpiod_set_value to configure output value.
>
> While at here
> - reorder the included headers.
> - drop remove hook after switching to use devm_gpiod_get_optional
> - Add return value for twl4030_init_chip to propagate value to parent
> in case defer probe happens
>
> Checking the only user logicpd-som-lv.dtsi that uses polarity
> GPIO_ACTIVE_HIGH, so all should work as expected.
>
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij