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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Jun 2013 14:03:02 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Christian Ruppert <christian.ruppert@...lis.com>
Cc:	Stephen Warren <swarren@...dotorg.org>,
	Patrice CHOTARD <patrice.chotard@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Grant Likely <grant.likely@...retlab.ca>,
	Rob Herring <rob.herring@...xeda.com>,
	Rob Landley <rob@...dley.net>,
	Sascha Leuenberger <sascha.leuenberger@...lis.com>,
	Pierrick Hascoet <pierrick.hascoet@...lis.com>,
	"devicetree-discuss@...ts.ozlabs.org" 
	<devicetree-discuss@...ts.ozlabs.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	Alexandre Courbot <acourbot@...dia.com>
Subject: Re: [PATCH 1/4] Make non-linear GPIO ranges accesible from gpiolib

On Tue, Jun 18, 2013 at 11:29 AM, Christian Ruppert
<christian.ruppert@...lis.com> wrote:

> This patch adds the infrastructure required to register non-linear gpio
> ranges through gpiolib and the standard GPIO device tree bindings.
>
> Signed-off-by: Christian Ruppert <christian.ruppert@...lis.com>

I'm basically fine with this, but would like Stephen's ACK if possible.

> +In addition, named groups of pins can be mapped to pin groups of a given
> +pin controller:
> +
> +       gpio_pio_g: gpio-controller@...0 {
> +               #gpio-cells = <2>;
> +               compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
> +               reg = <0x1480 0x18>;
> +               gpio-controller;
> +               gpio-ranges = <&pinctrl1 0 0 0>, <&pinctrl2 3 0 0>;
> +               gpio-ranges-group-names = "foo", "bar";
> +       };
> +
> +where,
> +   &pinctrl1 and &pinctrl2 is the phandle to the pinctrl DT node.
> +
> +   The following value specifies the base GPIO offset of the pin range with
> +   respect to the GPIO controller's base. The remaining two values must be
> +   0 to indicate that a named pin group should be used for the respective
> +   range. The number of pins in the range is the number of pins in the pin
> +   group.

So while this works, these zeroes seem a bit awkward, but maybe
it's the only way?

I'm not good enough on device tree conventions, but isn't this possible:

              gpio-ranges = <&pinctrl1 0>, <&pinctrl2 3>;
              gpio-ranges-group-names = "foo", "bar";

Since we don't have any #gpio-ranges-cells or anything like that I
guess we can define this to have a flexible number of cells
depending on use case?

In the mixed case the blank groups does not look
good eitherm, wouldn't this be possible:


        gpio-ranges =           <&pinctrl1 0 20 10>,
                                        <&pinctrl2 10>,
                                        <&pinctrl1 15 0 10>,
                                        <&pinctrl2 25>;
        // Matches the two ranges without pins
        gpio-ranges-group-names = "foo", "bar";

Or is this just making things complicated?

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