Re: [PATCH 4/7] ASoC: codec: cs42l56: Convert to GPIO descriptors

From: Peng Fan
Date: Tue Apr 08 2025 - 11:02:04 EST


On Tue, Apr 08, 2025 at 03:24:35PM +0100, Mark Brown wrote:
>On Tue, Apr 08, 2025 at 09:40:00AM +0800, Peng Fan (OSS) 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 with default
>> polarity GPIOD_OUT_LOW, set consumer name.
>> - Use gpiod_set_value_cansleep to configure output value.
>
>> While at here
>> - reorder the included headers.
>> - Move cs42l56_platform_data from sound/cs42l56.h to driver code
>> - Drop sound/cs42l56.h because no user is creating the device using
>> platform data
>
>This is a good sign that things should be split into multiple patches.
>The series would probably be a little more manageable in general if it
>were done per driver.

Sure. Just drop this patchset, I will do the patches per driver and
split the changes to a single driver into multiple small patches.

>
>> Per datasheet, the DTS polarity should be GPIOD_ACTIVE_LOW. The binding
>> example use value 0(GPIOD_ACTIVE_HIGH) which seems wrong. There is
>> no in-tree DTS has the device, so all should be fine.
>
>This is the whole thing where gpiolib introducing inversion causing
>confusion.

Let's see whether Linus and Bartosz prefer a polarity quirk for this.

But honestly, I am thinking if might be better to remove the drivers
that for end-of-life chips and no users for quite long time(years?).

Thanks,
Peng