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: <4582579.9WMrIMALsy@wuerfel>
Date:	Tue, 21 Oct 2014 09:54:45 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Alexandre Courbot <gnurou@...il.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Grant Likely <grant.likely@...aro.org>,
	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	Aaron Lu <aaron.lu@...el.com>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Bryan Wu <cooloney@...il.com>,
	Darren Hart <dvhart@...ux.intel.com>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: GPIO bindings guidelines (Was: Re: [PATCH v5 10/12] gpio: Support for unified device properties interface)

On Tuesday 21 October 2014 14:14:02 Alexandre Courbot wrote:
> >
> > We have enforced naming things for the dmaengine binding, which has
> > just led to everyone calling things "rx" and "tx". My fear is that
> > if we start to enforce giving a name, we'd end up with lots of
> > drivers that use a "gpio-gpios" property or something silly.
> 
> Checking the bindings is also part of the review process.  Things
> like "gpio-gpios" should simply not be accepted to begin with.
> 
> This sounds like a good chance to finally land some guidelines
> regarding GPIO bindings. Let's summarize the situation:
> - GPIO bindings can be defined using both DT and ACPI (both interfaces
> nicely abstracted by the interface introduced by this series)
> - Both firmware interfaces support indexed GPIOs
> - Both firmware interfaces support named GPIO properties, with an
> optional index (can we absolutely take this for granted on ACPI now?)

The developers working on it have said that they definitely want to
be compatible with the existing bindings, so the answer to your question
is yes.

> - For DT bindings, both foo-gpio and foo-gpios are valid properties
> for the GPIO "foo".

I would like to see the documentation recommend one over the other for
new bindings. Most other subsystems use the plural form even for
properties that only have one entry, so I'd like to see "foo-gpios"
become the canonical form for named gpio lines. Drivers that use
existing bindings with the "foo-gpio" form (or worse, "foo-somethingelse"
can use the same internal interface as the drivers that use name plus
index. Do you see a problem using what I suggested for the combined
API:

__gpiod_get(dev, propname, index); // use property name plus index
gpiod_get(dev, index); // use "gpios" plus index
gpiod_get_named(dev, "name"); use "name-gpios" with index 0

plus all fwprop/devm/flags/of/... variations of that

	Arnd
--
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