linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Andrew F. Davis" <afd@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	"Shawn Guo" <shawnguo@kernel.org>,
	"Sascha Hauer" <kernel@pengutronix.de>,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/9] ASoC: tlv320aic31xx: Fix the reset GPIO OF name
Date: Wed, 8 Nov 2017 17:25:20 -0600	[thread overview]
Message-ID: <1374534b-ac17-82ef-7b3b-3c6e4d4c5cc9@ti.com> (raw)
In-Reply-To: <20171108221814.m6j3dgrlqpy4htxf@sirena.co.uk>

On 11/08/2017 04:18 PM, Mark Brown wrote:
> On Wed, Nov 08, 2017 at 03:53:51PM -0600, Andrew F. Davis wrote:
>> On 11/08/2017 03:36 PM, Mark Brown wrote:
>>> On Wed, Nov 08, 2017 at 03:25:04PM -0600, Andrew F. Davis wrote:
> 
>>> This is obviously an incompatible change in the binding which will break
>>> any production DTs relying on the current behaviour.  You need to keep
>>> support for the existing property.
> 
>> I understand the reasons not to change driver behavior wrt DT, but this
>> driver did not make functional use of this gpio, only going forward will
>> this gpio be used for actually reseting the device (in some patches I
>> will post soon). So I would like to fix this incorrect binding *before*
>> fixing it will cause behavior incompatibilities.
> 
> There is code in the driver to use the GPIO, including in the probe
> where the GPIO is requested and set to high (which will bring it out of
> reset if the default state was low).  At least the probe seems rather
> likely to have a concrete effect.
> 

None of the 4 boards that defined this gpio have this pulled low in the
pin control, boards should have an external pull-up on the reset line.

At any-rate, I'm pushing this fix to allow the driver to use new kernel
frameworks that depend on the correct binding being used. This is not a
case of a badly designed binding or trying to add incompatible
functionality, it is a typo fix. If we have to keep this driver back
using old frameworks and needlessly bloat the code solely for the sake
of compatibility with a typo, then DT "stability" here is causing more
issues than it solves. </rant>




I guess the alternative would be to have of_find_gpio() also consider
prefixing, the 'gpio_suffixes' to 'con_id' and checking for those. That
is rather ugly and probably encourages the spread of this bad binding
property, but whatever the best fix is it cannot be to force bloat into
the driver.

>>> It also doesn't look like a good fix if we're aiming for conformance
>>> with DT naming conventions as unless things changed all GPIO related
>>> properties are supposed to end -gpios even if they can only ever specify
>>> a single GPIO.
> 
>> If that is the new standard I can fix this patch to use -gpios.
> 
> It's always been the standard AFAIK.
> 

Will fix for v2.

  reply	other threads:[~2017-11-08 23:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 21:24 [PATCH 0/9] Remove use of "gpio-reset" from DT Andrew F. Davis
2017-11-08 21:24 ` [PATCH 1/9] ASoC: tlv320aic31xx: Fix typo in DT binding documentation Andrew F. Davis
2017-11-09 14:25   ` Philipp Zabel
2017-11-09 16:28     ` Andrew F. Davis
2017-11-08 21:24 ` [PATCH 2/9] ASoC: tlv320aic3x: " Andrew F. Davis
2017-11-09 20:26   ` [alsa-devel] " Benoît Thébaudeau
2017-11-09 20:42     ` Andrew F. Davis
2017-11-08 21:24 ` [PATCH 3/9] ASoC: cs42l56: bindings: sound: Fix reset GPIO name in example DT binding Andrew F. Davis
2017-11-13 21:20   ` Rob Herring
2017-11-08 21:25 ` [PATCH 4/9] ARM: dts: am335x-pepper: Fix the audio CODEC's reset pin Andrew F. Davis
2017-11-09 14:25   ` Philipp Zabel
2017-11-09 16:40     ` Andrew F. Davis
2017-11-08 21:25 ` [PATCH 5/9] ARM: dts: imx6: RDU2: " Andrew F. Davis
2017-11-08 21:25 ` [PATCH 6/9] ARM: dts: imx: " Andrew F. Davis
2017-11-08 21:25 ` [PATCH 7/9] ARM: dts: omap3-n900: " Andrew F. Davis
2017-11-08 21:25 ` [PATCH 8/9] ASoC: tlv320aic31xx: Fix the reset GPIO OF name Andrew F. Davis
2017-11-08 21:36   ` Mark Brown
2017-11-08 21:53     ` Andrew F. Davis
2017-11-08 22:18       ` Mark Brown
2017-11-08 23:25         ` Andrew F. Davis [this message]
2017-11-09 13:22           ` Mark Brown
2017-11-08 21:25 ` [PATCH 9/9] ASoC: tlv320aic3x: " Andrew F. Davis

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=1374534b-ac17-82ef-7b3b-3c6e4d4c5cc9@ti.com \
    --to=afd@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).