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:	Tue, 18 Sep 2012 08:28:16 -0500
From:	Rob Herring <robherring2@...il.com>
To:	Thierry Reding <thierry.reding@...onic-design.de>
CC:	Linus Walleij <linus.walleij@...ricsson.com>,
	Grant Likely <grant.likely@...retlab.ca>,
	devicetree-discuss@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] gpio: Describe interrupt-controller binding

On 09/18/2012 03:51 AM, Thierry Reding wrote:
> In order to use GPIO controllers as interrupt controllers, they need to
> be marked with the DT interrupt-controller property. This commit adds
> some documentation about this to the general GPIO binding document.
> 
> Cc: Linus Walleij <linus.walleij@...ricsson.com>
> Cc: Grant Likely <grant.likely@...retlab.ca>
> Cc: Rob Herring <rob.herring@...xeda.com>
> Cc: devicetree-discuss@...ts.ozlabs.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Thierry Reding <thierry.reding@...onic-design.de>

Applied for 3.7.

Rob

> ---
>  Documentation/devicetree/bindings/gpio/gpio.txt | 33 +++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt b/Documentation/devicetree/bindings/gpio/gpio.txt
> index 4e16ba4..8d125b0 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio.txt
> +++ b/Documentation/devicetree/bindings/gpio/gpio.txt
> @@ -75,4 +75,37 @@ Example of two SOC GPIO banks defined as gpio-controller nodes:
>  		gpio-controller;
>  	};
>  
> +If the GPIO controller supports the generation of interrupts, it should
> +also contain an empty "interrupt-controller" property as well as an
> +"#interrupt-cells" property. This is required in order for other nodes
> +to use the GPIO controller as their interrupt parent.
>  
> +If #interrupt-cells is 1, the single cell is used to specify the number
> +of the GPIO that is to be used as an interrupt.
> +
> +If #interrupt-cells is 2, the first cell is used to specify the number
> +of the GPIO that is to be used as an interrupt, whereas the second cell
> +is used to specify any of the following flags:
> +  - bits[3:0] trigger type and level flags
> +      1 = low-to-high edge triggered
> +      2 = high-to-low edge triggered
> +      4 = active high level-sensitive
> +      8 = active low level-sensitive
> +
> +Example:
> +
> +	gpioext: gpio-controller@41 {
> +		compatible = "ad,gpio-adnp";
> +		reg = <0x41>;
> +
> +		interrupt-parent = <&gpio>;
> +		interrupts = <160 1>;
> +
> +		gpio-controller;
> +		#gpio-cells = <2>;
> +
> +		interrupt-controller;
> +		#interrupt-cells = <2>;
> +
> +		nr-gpios = <64>;
> +	};
> 
--
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