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] [thread-next>] [day] [month] [year] [list]
Message-ID: <530CD45A.8050803@wwwdotorg.org>
Date:	Tue, 25 Feb 2014 10:35:22 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
CC:	Chen-Yu Tsai <wens@...e.org>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Johannes Berg <johannes@...solutions.net>,
	"David S. Miller" <davem@...emloft.net>,
	Rhyland Klein <rklein@...dia.com>,
	linux-wireless <linux-wireless@...r.kernel.org>,
	netdev <netdev@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Arnd Bergmann <arnd@...db.de>,
	Mark Gross <mark.gross@...el.com>
Subject: Re: [PATCH 2/4] net: rfkill: gpio: remove gpio names

On 02/25/2014 02:13 AM, Linus Walleij wrote:
> On Fri, Feb 21, 2014 at 6:35 AM, Stephen Warren <swarren@...dotorg.org> wrote:
>> On 02/20/2014 06:55 PM, Chen-Yu Tsai wrote:
> 
>>> That's correct. However using con_id to pass this results in different
>>> behavior across DT and ACPI. A better way is to export the labeling
>>> function so consumers can set meaningful labels themselves.
...
> As in tegra30-beaver.dts...
> 
>     sdhci@...00000 {
>             status = "okay";
>             cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
>             wp-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
>             power-gpios = <&gpio TEGRA_GPIO(D, 7) GPIO_ACTIVE_HIGH>;
>             bus-width = <4>;
>     };
> 
> Instead of passing the GPIOs as index 0,1,2 they are named
> and I do admit this has a nice "things are under control" aspect
> to it.
> 
> In the ACPI case the con_id is not used for anything.
> 
> So it is basically there to satisfy the habit in some device
> tree bindings to name gpio arrays instead of just passing gpios = <...>;
> (The latter should be encouraged going forward.)

Do you really want to switch from named GPIO lookups to index-based GPIO
lookups? Index-based lookups make it much harder to extend the DT
binding in a backwards-compatible fashion, especially in the face of
optional GPIOs (of which all of CD, WP, power are).

If we switch to a single gpios property, I'd assert we should still do
named-based lookups using a parallel gpio-names property, just like most
(all?) other resource types now support. If we do that, we'll still need
the name parameter.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ