diff options
author | Tony Lindgren <tony@atomide.com> | 2013-10-03 00:39:40 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-10-10 18:30:30 -0400 |
commit | 3e6cee1786a13cb2308609b5f8c020e1754e37cf (patch) | |
tree | f76f85def8d2fd5654146ff9e612371590555573 /Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |
parent | 02e483f66deb6bd8df6af450726574614eb53be3 (diff) |
pinctrl: single: Add support for wake-up interrupts
The pin control registers can have interrupts for example
for device wake-up. These interrupts can be treated as a
chained interrupt controller as suggested earlier by
Linus Walleij <linus.walleij@linaro.org>.
This patch adds support for interrupts in a way that
should be pretty generic, and works for the omaps that
support wake-up interrupts. On omaps, there's an
interrupt enable and interrupt status bit for each pin.
The two pinctrl domains on omaps share a single interrupt
from the PRM chained interrupt handler. Support for
other similar hardware should be easy to add.
Note that this patch does not attempt to handle the
wake-up interrupts automatically unlike the earlier
patches. This patch allows the device drivers to do
a request_irq() on the wake-up pins as needed. I'll
try to do also a separate generic patch for handling
the wake-up events automatically.
Also note that as this patch makes the pinctrl-single
an irq controller, the current bindings need some
extra trickery to use interrupts from two different
interrupt controllers for the same driver. So it
might be worth waiting a little on the patches
enabling the wake-up interrupts from drivers as there
should be a generic way to handle it coming. And also
there's been discussion of interrupts-extended binding
for using interrupts from multiple interrupt controllers.
In any case, this patch should be ready to go allowing
handling the wake-up interrupts in a generic way, or
separately from the device drivers.
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Prakash Manjunathappa <prakash.pm@ti.com>
Cc: Roger Quadros <rogerq@ti.com>
Cc: linux-kernel@vger.kernel.org
Cc: BenoƮt Cousson <bcousson@baylibre.com>
Cc: devicetree@vger.kernel.org
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt')
-rw-r--r-- | Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt index 5a02e30dd262..7069a0b84e3a 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -72,6 +72,13 @@ Optional properties: | |||
72 | /* pin base, nr pins & gpio function */ | 72 | /* pin base, nr pins & gpio function */ |
73 | pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1>; | 73 | pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1>; |
74 | 74 | ||
75 | - interrupt-controller : standard interrupt controller binding if using | ||
76 | interrupts for wake-up events for example. In this case pinctrl-single | ||
77 | is set up as a chained interrupt controller and the wake-up interrupts | ||
78 | can be requested by the drivers using request_irq(). | ||
79 | |||
80 | - #interrupt-cells : standard interrupt binding if using interrupts | ||
81 | |||
75 | This driver assumes that there is only one register for each pin (unless the | 82 | This driver assumes that there is only one register for each pin (unless the |
76 | pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as | 83 | pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as |
77 | specified in the pinctrl-bindings.txt document in this directory. | 84 | specified in the pinctrl-bindings.txt document in this directory. |
@@ -121,6 +128,8 @@ pmx_core: pinmux@4a100040 { | |||
121 | reg = <0x4a100040 0x0196>; | 128 | reg = <0x4a100040 0x0196>; |
122 | #address-cells = <1>; | 129 | #address-cells = <1>; |
123 | #size-cells = <0>; | 130 | #size-cells = <0>; |
131 | #interrupt-cells = <1>; | ||
132 | interrupt-controller; | ||
124 | pinctrl-single,register-width = <16>; | 133 | pinctrl-single,register-width = <16>; |
125 | pinctrl-single,function-mask = <0xffff>; | 134 | pinctrl-single,function-mask = <0xffff>; |
126 | }; | 135 | }; |
@@ -131,6 +140,8 @@ pmx_wkup: pinmux@4a31e040 { | |||
131 | reg = <0x4a31e040 0x0038>; | 140 | reg = <0x4a31e040 0x0038>; |
132 | #address-cells = <1>; | 141 | #address-cells = <1>; |
133 | #size-cells = <0>; | 142 | #size-cells = <0>; |
143 | #interrupt-cells = <1>; | ||
144 | interrupt-controller; | ||
134 | pinctrl-single,register-width = <16>; | 145 | pinctrl-single,register-width = <16>; |
135 | pinctrl-single,function-mask = <0xffff>; | 146 | pinctrl-single,function-mask = <0xffff>; |
136 | }; | 147 | }; |