Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO

Linus Walleij
2014-09-04T17:15:17Z

On Mon, Sep 1, 2014 at 1:59 PM, Dmitry Eremin-Solenikov
<dmitry_eremin@mentor.com> wrote:

> 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.

The API change that is going on is to switch platforms and subsystems
to only deal with GPIO descriptors, which are pointer cookies such as
is regulators and clocks. See Documentation/gpio/*

Fixing the old global GPIO numberspace API is a waste of time IMO,
it is just restricted by design and we want to get rid of it.

Yours,
Linus Walleij