Re: [PATCH] ASoC: codec: ak5386: Convert to GPIO descriptors

From: Andy Shevchenko
Date: Mon Mar 31 2025 - 03:19:29 EST


On Mon, Mar 31, 2025 at 02:03:59PM +0800, Peng Fan wrote:
> On Fri, Mar 28, 2025 at 03:33:11PM +0200, Andy Shevchenko wrote:
> >On Fri, Mar 28, 2025 at 07:39:17PM +0800, Peng Fan (OSS) wrote:

...

> >> The Documentation/devicetree/bindings/sound/ak5386.txt not specify
> >> polarity(this seems bug), so per code and datasheet, I think it
> >> should be active-high. I could add a quirk in gpiolib-of to force
> >> active-high or acitive-low if you think needed.
> >
> >I don't think we need a quirk as long as the default is the same,
> >I mean if the DTS is written without setting polarity, would it be
> >active-high or active-low?
>
> Per current gpio driver, of_gpio_n_cells should at least be 2,
> Not find any driver using 1 in current linux tree.

Yes...

> Without polarity, I think of_xlate will not work as expected.

...and yes, but how is it related to my comment? The default should be sane
to make it work, since there is no in-kernel user with wrong polarity there
is nothing to fix.

--
With Best Regards,
Andy Shevchenko