Messages in this thread | | | Date | Thu, 4 Sep 2014 19:19:54 +0200 | Subject | Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO | From | Linus Walleij <> |
| |
On Mon, Sep 1, 2014 at 9:46 AM, Dirk Behme <dirk.behme@de.bosch.com> wrote: > On 29.08.2014 21:01, Mark Brown wrote:
>> Any current boards should be using DT and so shouldn't be using fixed >> GPIO numbers in the first place which will mean they'll not end up >> getting zero as a valid GPIO. > > Hmm? What's wrong with a DT entry > > <&gpio1 0 0>; > > for ena_gpio resulting in zero as a valid GPIO?
I don't know if it's relevant to the discussion but that is not GPIO #0 in the global GPIO numberspace, it is *offset* zero on some gpio_chip named gpio1.
At probe time that chip is given some base offset and offset 0 becomes the global GPIO number (base+offset) so if that GPIO chip starts from 128 this indicates global GPIO number 128.
Or something totally different. It's a Linux-specific implementation detail, all DT GPIO notations are relative offsets.
Yours, Linus Walleij
| |