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]
Date:	Wed, 22 Oct 2014 10:33:32 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:	Alexandre Courbot <gnurou@...il.com>,
	"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>,
	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 Wednesday 22 October 2014 11:10:44 Mika Westerberg wrote:
> 
> It expects that GPIOs returned from _CRS are in specific order. Since we
> can't change these existing ACPI tables, we must support them somehow.
> 
> This patch series handles it so that:
> 
>   1) If we can't find given property (e.g "reset-gpios" or
>      "shutdown-gpios") the index above will refer directly to the GPIO
>      resource returned from _CRS.
> 
>   2) If the property is found we ignore index and take it from the
>      property instead.
> 
> This has the drawback that we cannot support this:
> 
>         Package () { "reset-gpios", Package () { ^GPIO, 0, 0, 0, ^GPIO, 1, 0, 0}}
>                                                                  ^^^^^^^^^^^^^^
> So the second entry in the above is not accessible using
> gpiod_get_index() and the reason is that we want to support the existing
> and new ACPI tables where _DSD is not being used.

So this is not using the DT binding but does thing slightly differently then.
In this case (supporting two incompatible bindings for DT and ACPI), I think
the only sensible driver implementation would be to know what we are asking
for and use different devm_gpiod_get_index statements based on the firmware
interface.

	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