diff options
author | NeilBrown <neilb@suse.de> | 2013-10-31 19:41:20 -0700 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2014-01-27 17:28:46 -0800 |
commit | 10ead6e59934be76b6ce255d6b842a432b207b7f (patch) | |
tree | aab76e123d6cda1cc9b3a484a3bdbf039e639c2c /Documentation/devicetree | |
parent | 9334129e8e956edfd51da37d5e5278478235c7b2 (diff) | |
download | op-kernel-dev-10ead6e59934be76b6ce255d6b842a432b207b7f.zip op-kernel-dev-10ead6e59934be76b6ce255d6b842a432b207b7f.tar.gz |
LEDS: tca6507: add device-tree support for GPIO configuration.
The 7 lines driven by the TCA6507 can either drive LEDs or act as output-only
GPIOs.
To make this distinction in devicetree we use the "compatible" property.
If the device attached to a line is "compatible" with "gpio", we treat it
like a GPIO. If it is "compatible" with "led" (or if no "compatible" value
is set) we treat it like an LED.
(cooloney@gmail.com: fix typo in the subject)
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r-- | Documentation/devicetree/bindings/leds/tca6507.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/leds/tca6507.txt b/Documentation/devicetree/bindings/leds/tca6507.txt index 80ff3df..d7221b8 100644 --- a/Documentation/devicetree/bindings/leds/tca6507.txt +++ b/Documentation/devicetree/bindings/leds/tca6507.txt @@ -2,6 +2,13 @@ LEDs connected to tca6507 Required properties: - compatible : should be : "ti,tca6507". +- #address-cells: must be 1 +- #size-cells: must be 0 +- reg: typically 0x45. + +Optional properties: +- gpio-controller: allows lines to be used as output-only GPIOs. +- #gpio-cells: if present, must be 0. Each led is represented as a sub-node of the ti,tca6507 device. @@ -10,6 +17,7 @@ LED sub-node properties: - reg : number of LED line (could be from 0 to 6) - linux,default-trigger : (optional) see Documentation/devicetree/bindings/leds/common.txt +- compatible: either "led" (the default) or "gpio". Examples: @@ -19,6 +27,9 @@ tca6507@45 { #size-cells = <0>; reg = <0x45>; + gpio-controller; + #gpio-cells = <2>; + led0: red-aux@0 { label = "red:aux"; reg = <0x0>; @@ -29,5 +40,10 @@ tca6507@45 { reg = <0x5>; linux,default-trigger = "default-on"; }; + + wifi-reset@6 { + reg = <0x6>; + compatible = "gpio"; + }; }; |