From: Mark Brown <broonie@kernel.org>
To: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Cc: Dirk Behme <dirk.behme@de.bosch.com>,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@in.bosch.com>,
Grant Likely <grant.likely@secretlab.ca>,
Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO
Date: Mon, 1 Sep 2014 13:06:02 +0100 [thread overview]
Message-ID: <20140901120602.GT29327@sirena.org.uk> (raw)
In-Reply-To: <54045FA6.70602@mentor.com>
[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]
On Mon, Sep 01, 2014 at 03:59:34PM +0400, Dmitry Eremin-Solenikov wrote:
> On 09/01/2014 02:15 PM, Mark Brown wrote:
> >There's no practical way to deploy that without breaking users - as soon
> >as you treat 0 as a valid GPIO you make all existing users relying on
> >the natural behaviour of treating 0 as default instantly buggy which is
> >not practical. Really the GPIO API is badly specified here.
> Back in the time before DTS conversion started, the 0 was a correct GPIO
> number. If somebody wanted to specify that no gpio is provided, he provided
> -1 as an invalid number. I have the feeling that allowing users to use 0 as
> 'no gpio' is a mistake. Or the API should be changed
> to disallow GPIO 0 to exist at all.
Please consider my point about making users instantly buggy - it's not
practical to introduce a new field into existing platform data which
needs initialization. Disallowing the use of 0 as a GPIO seems more
practical here (in that it's something the platform can control with
more reliable coordination).
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-09-01 12:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 18:19 Dmitry Eremin-Solenikov
2014-08-29 19:01 ` Mark Brown
2014-09-01 7:46 ` Dirk Behme
2014-09-01 7:55 ` Geert Uytterhoeven
2014-09-01 10:15 ` Mark Brown
2014-09-01 11:59 ` Dmitry Eremin-Solenikov
2014-09-01 12:06 ` Mark Brown [this message]
2014-09-01 12:35 ` Dmitry Eremin-Solenikov
2014-09-01 12:49 ` Mark Brown
2014-09-03 9:04 ` Dmitry Eremin-Solenikov
2014-09-03 11:01 ` Mark Brown
2014-09-04 17:15 ` Linus Walleij
2014-09-04 17:19 ` Linus Walleij
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=20140901120602.GT29327@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Gokulkrishnan.Nagarajan@in.bosch.com \
--cc=dirk.behme@de.bosch.com \
--cc=dmitry_eremin@mentor.com \
--cc=grant.likely@secretlab.ca \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome