aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2012-08-22 03:32:29 -0400
committerBryan Wu <bryan.wu@canonical.com>2012-09-11 06:32:41 -0400
commit94b43b677104e50b9f8dd75aacb3c69e16089a68 (patch)
tree991fa64dbabaa3eee5c0dd900a4bbe5ca0c0e3aa /Documentation
parent127aedc8ecae2628511533ddeb239e99e4bed5e8 (diff)
leds-lp5523: add channel name in the platform data
The name of each led channel is configurable. If the name is NULL, just use the channel id for making the channel name Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/leds/leds-lp5523.txt21
1 files changed, 18 insertions, 3 deletions
diff --git a/Documentation/leds/leds-lp5523.txt b/Documentation/leds/leds-lp5523.txt
index fad2feb8b7ce..c2743f59f9ac 100644
--- a/Documentation/leds/leds-lp5523.txt
+++ b/Documentation/leds/leds-lp5523.txt
@@ -10,8 +10,22 @@ Contact: Samu Onkalo (samu.p.onkalo-at-nokia.com)
10Description 10Description
11----------- 11-----------
12LP5523 can drive up to 9 channels. Leds can be controlled directly via 12LP5523 can drive up to 9 channels. Leds can be controlled directly via
13the led class control interface. Channels have generic names: 13the led class control interface.
14lp5523:channelx where x is 0...8 14The name of each channel is configurable in the platform data - name and label.
15There are three options to make the channel name.
16
17a) Define the 'name' in the platform data
18To make specific channel name, then use 'name' platform data.
19/sys/class/leds/R1 (name: 'R1')
20/sys/class/leds/B1 (name: 'B1')
21
22b) Use the 'label' with no 'name' field
23For one device name with channel number, then use 'label'.
24/sys/class/leds/RGB:channelN (label: 'RGB', N: 0 ~ 8)
25
26c) Default
27If both fields are NULL, 'lp5523' is used by default.
28/sys/class/leds/lp5523:channelN (N: 0 ~ 8)
15 29
16The chip provides 3 engines. Each engine can control channels without 30The chip provides 3 engines. Each engine can control channels without
17interaction from the main CPU. Details of the micro engine code can be found 31interaction from the main CPU. Details of the micro engine code can be found
@@ -46,12 +60,13 @@ Note - chan_nr can have values between 0 and 8.
46 60
47static struct lp5523_led_config lp5523_led_config[] = { 61static struct lp5523_led_config lp5523_led_config[] = {
48 { 62 {
63 .name = "D1",
49 .chan_nr = 0, 64 .chan_nr = 0,
50 .led_current = 50, 65 .led_current = 50,
51 .max_current = 130, 66 .max_current = 130,
52 }, 67 },
53... 68...
54 }, { 69 {
55 .chan_nr = 8, 70 .chan_nr = 8,
56 .led_current = 50, 71 .led_current = 50,
57 .max_current = 130, 72 .max_current = 130,