public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
To: Mark Brown <broonie@kernel.org>
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: Wed, 3 Sep 2014 13:04:13 +0400	[thread overview]
Message-ID: <5406D98D.7000402@mentor.com> (raw)
In-Reply-To: <20140901124947.GU29327@sirena.org.uk>

On 09/01/2014 04:49 PM, Mark Brown wrote:
> On Mon, Sep 01, 2014 at 04:35:27PM +0400, Dmitry Eremin-Solenikov wrote:
>> On 09/01/2014 04:06 PM, Mark Brown wrote:
>
>>> 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).
>
>> I think that this makes other users buggy - those, whose platforms use GPIO
>> numbering starting from 0. IMX platform does. legacy platforms do.
>
> It means that they can't use this feature for these specific GPIOs
> unless someone writes some code to make it happen either by renumbering
> or by adding generic code that provides a way to specify this, it
> doesn't make anything worse than it is already.
>
>> Consider NO_IRQ which is still defined to -1 on ARM platforms. If a device
>> does not have a connected IRQ, it has to explicitly specify -1 instead of
>> specifying logical default 0. Is it so? What is so different with GPIOs and
>> regulators?
>
> As I'm getting fed up of pointing out we can't make existing users buggy
> - we couldn't do it when we added support for enable GPIOs and we can't
> do it now.  Exactly the same problem would occur if adding platform data
> to specify an interrupt where none was previously specified (which is
> why there's a move away from NO_IRQ being -1).
>
> Please, you need to care about other users.

OK, if the question is about other users, should we review all current 
users that do not specify that gpio, change them to pass -1 and then 
allow valid GPIO#0 as a valid ena_gpio? What do you think about a patch
that will warn for one or two releases that ena_gpio == 0 will change 
meaning in a forthcoming feature?


-- 
With best wishes
Dmitry

  reply	other threads:[~2014-09-03  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 18:19 [PATCH] regulator: core: GPIO #0 is a valid GPIO 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
2014-09-01 12:35           ` Dmitry Eremin-Solenikov
2014-09-01 12:49             ` Mark Brown
2014-09-03  9:04               ` Dmitry Eremin-Solenikov [this message]
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=5406D98D.7000402@mentor.com \
    --to=dmitry_eremin@mentor.com \
    --cc=Gokulkrishnan.Nagarajan@in.bosch.com \
    --cc=broonie@kernel.org \
    --cc=dirk.behme@de.bosch.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