lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yis6g1VSWfl7I8cS@sirena.org.uk>
Date:   Fri, 11 Mar 2022 12:03:15 +0000
From:   Mark Brown <broonie@...nel.org>
To:     John Keeping <john@...anate.com>
Cc:     alsa-devel@...a-project.org, Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Daniel Beer <daniel.beer@...rinstitute.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ASoC: tas5805m: fix pdn polarity

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.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ