[PATCH v2] ASoC: tas5805m: fix pdn polarity

Mark Brown broonie at kernel.org
Fri Mar 11 13:03:15 CET 2022


On Thu, Mar 10, 2022 at 08:09:42PM +0000, John Keeping wrote:
> On Wed, Mar 09, 2022 at 09:55:40PM +0000, Mark Brown wrote:

> > Sure, I still think it would be good to update the binding document to
> > clarify things as part of your patch - the binding currently just has it
> > as the "pdn" pin not the /pdn pin or anything.

> I've been thinking about this but I can't really think what to say.
> tas571x's binding says:

> 	GPIO specifier for the TAS571x's active low powerdown line

> Is that the sort of wording you have in mind?

Something along those lines, probably also mention something about the
flag.  If the DT has to specify the polarity for things to work
(basically, if it's not active high) then that should be in the binding.

> To me it seems like a general principle that the GPIO_ACTIVE_{HIGH,LOW}
> flags should be used to indicate how the pin works so that the driver
> consistently uses logical levels regardless of how the hardware is
> wired.

Every layer that introduces an inversion is a source of confusion - if
the physical signal needs to be set low but the code in the driver sets
the signal high that's a surprise for people, and generally if the user
needs to specify that the polarity is inverted every time they bind the
device that's a gotcha people won't tend to expect.

> Maybe this just means I'm approaching this "down" from the software
> abstraction more than "up" from the hardware.

Think about it more as being about making it easier to follow what the
physical state of the GPIO is.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20220311/6436dc00/attachment.sig>


More information about the Alsa-devel mailing list