From: Mark Brown <broonie@kernel.org>
To: John Keeping <john@metanate.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Daniel Beer <daniel.beer@igorinstitute.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ASoC: tas5805m: fix pdn polarity
Date: Fri, 11 Mar 2022 12:03:15 +0000 [thread overview]
Message-ID: <Yis6g1VSWfl7I8cS@sirena.org.uk> (raw)
In-Reply-To: <YipbBti4yeq2HzCe@donbot>
[-- Attachment #1: Type: text/plain, Size: 1533 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-03-11 12:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 13:56 [PATCH v2] ASoC: tas5805m: fix pdn polarity John Keeping
2022-03-09 15:56 ` Mark Brown
2022-03-09 16:19 ` John Keeping
2022-03-09 16:28 ` Mark Brown
2022-03-09 20:16 ` John Keeping
2022-03-09 21:55 ` Mark Brown
2022-03-10 20:09 ` John Keeping
2022-03-11 12:03 ` Mark Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yis6g1VSWfl7I8cS@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=daniel.beer@igorinstitute.com \
--cc=john@metanate.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox