diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-01-04 03:39:37 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-02-06 21:25:00 -0500 |
commit | 6f74dc9bc8de41f3de474a7269a70921e773c40f (patch) | |
tree | 2804776d56077c3732db396e0cf42719ee9a83a5 /Documentation/devicetree | |
parent | 2123552d12168e744271aaf206e5826760fbd857 (diff) |
gpio: tegra: Dynamically allocate IRQ base, and support DT
Enhance the driver to dynamically allocate the base IRQ number, and
create an IRQ domain for itself. The use of an IRQ domain ensures that
any device tree node interrupts properties are correctly parsed.
Describe interrupt-related properties in the device tree binding docs,
and the contents of "child" node interrupts property.
Update tegra*.dtsi to specify the required interrupt-related properties.
Finally, remove the definition of TEGRA_GPIO_TO_IRQ; this macro no longer
gives correct results since the IRQ numbers for GPIOs are dynamically
allocated.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio_nvidia.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt index 50b363c5b884..d114e1997d39 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt +++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt | |||
@@ -8,6 +8,16 @@ Required properties: | |||
8 | second cell is used to specify optional parameters: | 8 | second cell is used to specify optional parameters: |
9 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | 9 | - bit 0 specifies polarity (0 for normal, 1 for inverted) |
10 | - gpio-controller : Marks the device node as a GPIO controller. | 10 | - gpio-controller : Marks the device node as a GPIO controller. |
11 | - #interrupt-cells : Should be 2. | ||
12 | The first cell is the GPIO number. | ||
13 | The second cell is used to specify flags: | ||
14 | bits[3:0] trigger type and level flags: | ||
15 | 1 = low-to-high edge triggered. | ||
16 | 2 = high-to-low edge triggered. | ||
17 | 4 = active high level-sensitive. | ||
18 | 8 = active low level-sensitive. | ||
19 | Valid combinations are 1, 2, 3, 4, 8. | ||
20 | - interrupt-controller : Marks the device node as an interrupt controller. | ||
11 | 21 | ||
12 | Example: | 22 | Example: |
13 | 23 | ||
@@ -23,4 +33,6 @@ gpio: gpio@6000d000 { | |||
23 | 0 89 0x04 >; | 33 | 0 89 0x04 >; |
24 | #gpio-cells = <2>; | 34 | #gpio-cells = <2>; |
25 | gpio-controller; | 35 | gpio-controller; |
36 | #interrupt-cells = <2>; | ||
37 | interrupt-controller; | ||
26 | }; | 38 | }; |