aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 14:35:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-12 14:35:33 -0400
commit5223161dc0f5e44fbf3d5e42d23697b6796cdf4e (patch)
tree10837ec58d96e751469d78d347f76c0d49238d72 /Documentation
parente5d0c874391a500be7643d3eef9fb07171eee129 (diff)
parent61abeba5222895d6900b13115f5d8eba7988d7d6 (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull led updates from Bryan Wu: "Sorry for the late pull request, since I'm just back from vacation. LED subsystem updates for 3.12: - pca9633 driver DT supporting and pca9634 chip supporting - restore legacy device attributes for lp5521 - other fixing and updates" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (28 commits) leds: wm831x-status: Request a REG resource leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback leds-pca963x: Fix device tree parsing leds-pca9633: Rename to leds-pca963x leds-pca9633: Add mutex to the ledout register leds-pca9633: Unique naming of the LEDs leds-pca9633: Add support for PCA9634 leds: lp5562: use LP55xx common macros for device attributes Documentation: leds-lp5521,lp5523: update device attribute information leds: lp5523: remove unnecessary writing commands leds: lp5523: restore legacy device attributes leds: lp5523: LED MUX configuration on initializing leds: lp5523: make separate API for loading engine leds: lp5521: remove unnecessary writing commands leds: lp5521: restore legacy device attributes leds: lp55xx: add common macros for device attributes leds: lp55xx: add common data structure for program Documentation: leds: Fix a typo leds: ss4200: Fix incorrect placement of __initdata leds: clevo-mail: Fix incorrect placement of __initdata ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/leds/leds-lp55xx.txt72
-rw-r--r--Documentation/devicetree/bindings/leds/pca963x.txt47
-rw-r--r--Documentation/leds/leds-lp5521.txt20
-rw-r--r--Documentation/leds/leds-lp5523.txt21
-rw-r--r--Documentation/leds/leds-lp55xx.txt30
5 files changed, 184 insertions, 6 deletions
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
index d5176882d8b9..a61727f9a6d1 100644
--- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
+++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt
@@ -1,7 +1,7 @@
1Binding for TI/National Semiconductor LP55xx Led Drivers 1Binding for TI/National Semiconductor LP55xx Led Drivers
2 2
3Required properties: 3Required properties:
4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" 4- compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501"
5- reg: I2C slave address 5- reg: I2C slave address
6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) 6- clock-mode: Input clock mode, (0: automode, 1: internal, 2: external)
7 7
@@ -11,6 +11,11 @@ Each child has own specific current settings
11 11
12Optional properties: 12Optional properties:
13- label: Used for naming LEDs 13- label: Used for naming LEDs
14- pwr-sel: LP8501 specific property. Power selection for output channels.
15 0: D1~9 are connected to VDD
16 1: D1~6 with VDD, D7~9 with VOUT
17 2: D1~6 with VOUT, D7~9 with VDD
18 3: D1~9 are connected to VOUT
14 19
15Alternatively, each child can have specific channel name 20Alternatively, each child can have specific channel name
16- chan-name: Name of each channel name 21- chan-name: Name of each channel name
@@ -145,3 +150,68 @@ lp5562@30 {
145 max-cur = /bits/ 8 <0x60>; 150 max-cur = /bits/ 8 <0x60>;
146 }; 151 };
147}; 152};
153
154example 4) LP8501
1559 channels are defined. The 'pwr-sel' is LP8501 specific property.
156Others are same as LP5523.
157
158lp8501@32 {
159 compatible = "ti,lp8501";
160 reg = <0x32>;
161 clock-mode = /bits/ 8 <2>;
162 pwr-sel = /bits/ 8 <3>; /* D1~9 connected to VOUT */
163
164 chan0 {
165 chan-name = "d1";
166 led-cur = /bits/ 8 <0x14>;
167 max-cur = /bits/ 8 <0x20>;
168 };
169
170 chan1 {
171 chan-name = "d2";
172 led-cur = /bits/ 8 <0x14>;
173 max-cur = /bits/ 8 <0x20>;
174 };
175
176 chan2 {
177 chan-name = "d3";
178 led-cur = /bits/ 8 <0x14>;
179 max-cur = /bits/ 8 <0x20>;
180 };
181
182 chan3 {
183 chan-name = "d4";
184 led-cur = /bits/ 8 <0x14>;
185 max-cur = /bits/ 8 <0x20>;
186 };
187
188 chan4 {
189 chan-name = "d5";
190 led-cur = /bits/ 8 <0x14>;
191 max-cur = /bits/ 8 <0x20>;
192 };
193
194 chan5 {
195 chan-name = "d6";
196 led-cur = /bits/ 8 <0x14>;
197 max-cur = /bits/ 8 <0x20>;
198 };
199
200 chan6 {
201 chan-name = "d7";
202 led-cur = /bits/ 8 <0x14>;
203 max-cur = /bits/ 8 <0x20>;
204 };
205
206 chan7 {
207 chan-name = "d8";
208 led-cur = /bits/ 8 <0x14>;
209 max-cur = /bits/ 8 <0x20>;
210 };
211
212 chan8 {
213 chan-name = "d9";
214 led-cur = /bits/ 8 <0x14>;
215 max-cur = /bits/ 8 <0x20>;
216 };
217};
diff --git a/Documentation/devicetree/bindings/leds/pca963x.txt b/Documentation/devicetree/bindings/leds/pca963x.txt
new file mode 100644
index 000000000000..aece3eac1b63
--- /dev/null
+++ b/Documentation/devicetree/bindings/leds/pca963x.txt
@@ -0,0 +1,47 @@
1LEDs connected to pca9632, pca9633 or pca9634
2
3Required properties:
4- compatible : should be : "nxp,pca9632", "nxp,pca9633" or "nxp,pca9634"
5
6Optional properties:
7- nxp,totem-pole : use totem pole (push-pull) instead of default open-drain
8- nxp,hw-blink : use hardware blinking instead of software blinking
9
10Each led is represented as a sub-node of the nxp,pca963x device.
11
12LED sub-node properties:
13- label : (optional) see Documentation/devicetree/bindings/leds/common.txt
14- reg : number of LED line (could be from 0 to 3 in pca9632 or pca9633
15 or 0 to 7 in pca9634)
16- linux,default-trigger : (optional)
17 see Documentation/devicetree/bindings/leds/common.txt
18
19Examples:
20
21pca9632: pca9632 {
22 compatible = "nxp,pca9632";
23 #address-cells = <1>;
24 #size-cells = <0>;
25 reg = <0x62>;
26
27 red@0 {
28 label = "red";
29 reg = <0>;
30 linux,default-trigger = "none";
31 };
32 green@1 {
33 label = "green";
34 reg = <1>;
35 linux,default-trigger = "none";
36 };
37 blue@2 {
38 label = "blue";
39 reg = <2>;
40 linux,default-trigger = "none";
41 };
42 unused@3 {
43 label = "unused";
44 reg = <3>;
45 linux,default-trigger = "none";
46 };
47};
diff --git a/Documentation/leds/leds-lp5521.txt b/Documentation/leds/leds-lp5521.txt
index 79e4c2e6e5e8..d08d8c179f85 100644
--- a/Documentation/leds/leds-lp5521.txt
+++ b/Documentation/leds/leds-lp5521.txt
@@ -18,7 +18,25 @@ All three channels can be also controlled using the engine micro programs.
18More details of the instructions can be found from the public data sheet. 18More details of the instructions can be found from the public data sheet.
19 19
20LP5521 has the internal program memory for running various LED patterns. 20LP5521 has the internal program memory for running various LED patterns.
21For the details, please refer to 'firmware' section in leds-lp55xx.txt 21There are two ways to run LED patterns.
22
231) Legacy interface - enginex_mode and enginex_load
24 Control interface for the engines:
25 x is 1 .. 3
26 enginex_mode : disabled, load, run
27 enginex_load : store program (visible only in engine load mode)
28
29 Example (start to blink the channel 2 led):
30 cd /sys/class/leds/lp5521:channel2/device
31 echo "load" > engine3_mode
32 echo "037f4d0003ff6000" > engine3_load
33 echo "run" > engine3_mode
34
35 To stop the engine:
36 echo "disabled" > engine3_mode
37
382) Firmware interface - LP55xx common interface
39 For the details, please refer to 'firmware' section in leds-lp55xx.txt
22 40
23sysfs contains a selftest entry. 41sysfs contains a selftest entry.
24The test communicates with the chip and checks that 42The test communicates with the chip and checks that
diff --git a/Documentation/leds/leds-lp5523.txt b/Documentation/leds/leds-lp5523.txt
index 899fdad509fe..5b3e91d4ac59 100644
--- a/Documentation/leds/leds-lp5523.txt
+++ b/Documentation/leds/leds-lp5523.txt
@@ -28,7 +28,26 @@ If both fields are NULL, 'lp5523' is used by default.
28/sys/class/leds/lp5523:channelN (N: 0 ~ 8) 28/sys/class/leds/lp5523:channelN (N: 0 ~ 8)
29 29
30LP5523 has the internal program memory for running various LED patterns. 30LP5523 has the internal program memory for running various LED patterns.
31For the details, please refer to 'firmware' section in leds-lp55xx.txt 31There are two ways to run LED patterns.
32
331) Legacy interface - enginex_mode, enginex_load and enginex_leds
34 Control interface for the engines:
35 x is 1 .. 3
36 enginex_mode : disabled, load, run
37 enginex_load : microcode load (visible only in load mode)
38 enginex_leds : led mux control (visible only in load mode)
39
40 cd /sys/class/leds/lp5523:channel2/device
41 echo "load" > engine3_mode
42 echo "9d80400004ff05ff437f0000" > engine3_load
43 echo "111111111" > engine3_leds
44 echo "run" > engine3_mode
45
46 To stop the engine:
47 echo "disabled" > engine3_mode
48
492) Firmware interface - LP55xx common interface
50 For the details, please refer to 'firmware' section in leds-lp55xx.txt
32 51
33Selftest uses always the current from the platform data. 52Selftest uses always the current from the platform data.
34 53
diff --git a/Documentation/leds/leds-lp55xx.txt b/Documentation/leds/leds-lp55xx.txt
index eec8fa2ffe4e..82713ff92eb3 100644
--- a/Documentation/leds/leds-lp55xx.txt
+++ b/Documentation/leds/leds-lp55xx.txt
@@ -1,11 +1,11 @@
1LP5521/LP5523/LP55231 Common Driver 1LP5521/LP5523/LP55231/LP5562/LP8501 Common Driver
2=================================== 2=================================================
3 3
4Authors: Milo(Woogyom) Kim <milo.kim@ti.com> 4Authors: Milo(Woogyom) Kim <milo.kim@ti.com>
5 5
6Description 6Description
7----------- 7-----------
8LP5521, LP5523/55231 and LP5562 have common features as below. 8LP5521, LP5523/55231, LP5562 and LP8501 have common features as below.
9 9
10 Register access via the I2C 10 Register access via the I2C
11 Device initialization/deinitialization 11 Device initialization/deinitialization
@@ -109,6 +109,30 @@ As soon as 'loading' is set to 0, registered callback is called.
109Inside the callback, the selected engine is loaded and memory is updated. 109Inside the callback, the selected engine is loaded and memory is updated.
110To run programmed pattern, 'run_engine' attribute should be enabled. 110To run programmed pattern, 'run_engine' attribute should be enabled.
111 111
112The pattern sqeuence of LP8501 is same as LP5523.
113However pattern data is specific.
114Ex 1) Engine 1 is used
115echo 1 > /sys/bus/i2c/devices/xxxx/select_engine
116echo 1 > /sys/class/firmware/lp8501/loading
117echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
118echo 0 > /sys/class/firmware/lp8501/loading
119echo 1 > /sys/bus/i2c/devices/xxxx/run_engine
120
121Ex 2) Engine 2 and 3 are used at the same time
122echo 2 > /sys/bus/i2c/devices/xxxx/select_engine
123sleep 1
124echo 1 > /sys/class/firmware/lp8501/loading
125echo "9d0140ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
126echo 0 > /sys/class/firmware/lp8501/loading
127sleep 1
128echo 3 > /sys/bus/i2c/devices/xxxx/select_engine
129sleep 1
130echo 1 > /sys/class/firmware/lp8501/loading
131echo "9d0340ff7e0040007e00a001c000" > /sys/class/firmware/lp8501/data
132echo 0 > /sys/class/firmware/lp8501/loading
133sleep 1
134echo 1 > /sys/class/leds/d1/device/run_engine
135
112( 'run_engine' and 'firmware_cb' ) 136( 'run_engine' and 'firmware_cb' )
113The sequence of running the program data is common. 137The sequence of running the program data is common.
114But each device has own specific register addresses for commands. 138But each device has own specific register addresses for commands.