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

From: Linus Walleij
Date: Thu Sep 04 2014 - 13:15:26 EST


On Mon, Sep 1, 2014 at 1:59 PM, Dmitry Eremin-Solenikov
<dmitry_eremin@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/