Re: [PATCH 2/7] ASoC: codec: tlv320aic32x4: Convert to GPIO descriptors

From: Linus Walleij
Date: Tue Apr 15 2025 - 09:26:59 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 devm_gpiod_get_optional to get GPIO descriptor, and set consumer
> name.
> - Use gpiod_set_value to configure output value.
>
> reset pin is active low, so when request the gpio, set GPIOD_OUT_HIGH to
> assert reset and later deassert reset with value set to 0.
>
> While at here, reorder the included headers.
>
> Checking the DTS that use the device, all are using GPIOD_ACTIVE_LOW
> polarity for reset-gpios, so all should work as expected with this patch.
>
> Cc: Markus Niebel <Markus.Niebel@xxxxxxxxxxxxxxx>
> Cc: Alexander Stein <alexander.stein@xxxxxxxxxxxxxxx>
> Signed-off-by: Peng Fan <peng.fan@xxxxxxx>

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

Yours,
Linus Walleij