lkml.org 
[lkml]   [2014]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] regulator: core: GPIO #0 is a valid GPIO
From
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


\
 
 \ /
  Last update: 2014-09-04 20:01    [W:0.077 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site