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

From: Mark Brown
Date: Tue Apr 08 2025 - 10:26:49 EST


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.

> 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.

Attachment: signature.asc
Description: PGP signature