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: <CAL_JsqLi4=6v-8B8eF-H1iQGa+3Zh=rzAWbCAJubnLNEitPaLQ@mail.gmail.com>
Date:	Tue, 7 Jun 2016 16:00:53 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Pantelis Antoniou <pantelis.antoniou@...sulko.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Alexandre Courbot <gnurou@...il.com>,
	Frank Rowand <frowand.list@...il.com>,
	Matt Porter <mporter@...sulko.com>,
	Koen Kooi <koen@...inion.thruhere.net>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	Guenter Roeck <linux@...ck-us.net>,
	Marek Vasut <marex@...x.de>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	Pantelis Antoniou <panto@...oniou-consulting.com>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 2/2] gpio: Support cascaded GPIO chip lookup for OF

+Mark R

On Fri, Jun 3, 2016 at 3:26 PM, Pantelis Antoniou
<pantelis.antoniou@...sulko.com> wrote:
> In certain cases it makes sense to create cascaded GPIO which
> are not real GPIOs, merely point to the real backend GPIO chip.

In what cases? Make it clear what this is for. Connectors of course,
but are there any other use cases you have in mind.

> In order to support this, cascaded of_xlate lookup need to be
> performed.
>
> For example let's take a connector that we want to abstract
> having two GPIO pins from different GPIO controllers, connector
> pin #0 connected to gpioA controller with offset 10 and gpioB
> with 4.

A connector's GPIO number may or may not be related to connector pins.

> In pseudo DT form this is analogous to:
>
>         gpioA: gpioa@...00 {
>                 compatible = "foocorp,gpio";
>                 ...
>         };
>
>         gpioB: gpiob@...00 {
>                 compatible = "foocorp,gpio";
>                 ....
>         };
>
>         gpioC: controller_gpio {
>                 compatible = "cascaded-gpio";

This compatible is kind of meaningless. I'd expect this to be a
connector compatible.

>                 gpios = <&gpioA 10>, <&gpioB 5>;

As we discussed at ELC, I think this should be modeled after
interrupt-map property like this:

gpio-map = <0 0 &soc_gpio 10 0>, <1 0 &soc_gpio 5 0>;
gpio-map-mask = <0xff 0>;

This is more flexible, a known pattern, and allows remapping of flag cells.

Also, we will likely have interrupt capable GPIOs, so they are going
to need interrupt-map anyway.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ