lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZgUvcJZ=GkGBUjBdxD_=9bjK9jOiQb798c3=g=4QLwMg@mail.gmail.com>
Date:	Thu, 4 Sep 2014 19:19:54 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Dirk Behme <dirk.behme@...bosch.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Dmitry Eremin-Solenikov <dmitry_eremin@...tor.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Gokulkrishnan Nagarajan <Gokulkrishnan.Nagarajan@...bosch.com>
Subject: Re: [PATCH] regulator: core: GPIO #0 is a valid GPIO

On Mon, Sep 1, 2014 at 9:46 AM, Dirk Behme <dirk.behme@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ