diff options
author | G.Shark Jeong <gshark.jeong@gmail.com> | 2012-06-21 20:12:06 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-07-23 19:52:35 -0400 |
commit | 32abb4788d3fff69fa242c7850e39ec1418df4f4 (patch) | |
tree | 26441f5ebda1a77b7f0f72fb6b487634b2e623c0 /Documentation | |
parent | 1522d02e275332080ec27e268edc29c79c6f5e0c (diff) |
leds: Add LED driver for lm3556 chip
LM3556 :
The LM3556 is a 4 MHz fixed-frequency synchronous boost
converter plus 1.5A constant current driver for a high-current white LED.
Datasheet: www.national.com/ds/LM/LM3556.pdf
Tested on OMAP4430
(bryan.wu@canonical.com: use module_i2c_driver() rather than
lm3556_init/lm3556_exit for code simplicity; fixed some typo
pointed out by Rob Landley)
Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Reviewed-by: Axel Lin <axel.lin@gmail.com>
Reviewed-by: Kim, Milo <Milo.Kim@ti.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/leds/00-INDEX | 2 | ||||
-rw-r--r-- | Documentation/leds/leds-lm3556.txt | 85 |
2 files changed, 87 insertions, 0 deletions
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX index 29f481df32c7..5fefe374892f 100644 --- a/Documentation/leds/00-INDEX +++ b/Documentation/leds/00-INDEX | |||
@@ -6,3 +6,5 @@ leds-lp5521.txt | |||
6 | - notes on how to use the leds-lp5521 driver. | 6 | - notes on how to use the leds-lp5521 driver. |
7 | leds-lp5523.txt | 7 | leds-lp5523.txt |
8 | - notes on how to use the leds-lp5523 driver. | 8 | - notes on how to use the leds-lp5523 driver. |
9 | leds-lm3556.txt | ||
10 | - notes on how to use the leds-lm3556 driver. | ||
diff --git a/Documentation/leds/leds-lm3556.txt b/Documentation/leds/leds-lm3556.txt new file mode 100644 index 000000000000..d9eb91b51913 --- /dev/null +++ b/Documentation/leds/leds-lm3556.txt | |||
@@ -0,0 +1,85 @@ | |||
1 | Kernel driver for lm3556 | ||
2 | ======================== | ||
3 | |||
4 | *Texas Instrument: | ||
5 | 1.5 A Synchronous Boost LED Flash Driver w/ High-Side Current Source | ||
6 | * Datasheet: http://www.national.com/ds/LM/LM3556.pdf | ||
7 | |||
8 | Authors: | ||
9 | Daniel Jeong | ||
10 | Contact:Daniel Jeong(daniel.jeong-at-ti.com, gshark.jeong-at-gmail.com) | ||
11 | |||
12 | Description | ||
13 | ----------- | ||
14 | There are 3 functions in LM3556, Flash, Torch and Indicator. | ||
15 | |||
16 | FLASH MODE | ||
17 | In Flash Mode, the LED current source(LED) provides 16 target current levels | ||
18 | from 93.75 mA to 1500 mA.The Flash currents are adjusted via the CURRENT | ||
19 | CONTROL REGISTER(0x09).Flash mode is activated by the ENABLE REGISTER(0x0A), | ||
20 | or by pulling the STROBE pin HIGH. | ||
21 | LM3556 Flash can be controlled through sys/class/leds/flash/brightness file | ||
22 | * if STROBE pin is enabled, below example control brightness only, and | ||
23 | ON / OFF will be controlled by STROBE pin. | ||
24 | |||
25 | Flash Example: | ||
26 | OFF : #echo 0 > sys/class/leds/flash/brightness | ||
27 | 93.75 mA: #echo 1 > sys/class/leds/flash/brightness | ||
28 | ... ..... | ||
29 | 1500 mA: #echo 16 > sys/class/leds/flash/brightness | ||
30 | |||
31 | TORCH MODE | ||
32 | In Torch Mode, the current source(LED) is programmed via the CURRENT CONTROL | ||
33 | REGISTER(0x09).Torch Mode is activated by the ENABLE REGISTER(0x0A) or by the | ||
34 | hardware TORCH input. | ||
35 | LM3556 torch can be controlled through sys/class/leds/torch/brightness file. | ||
36 | * if TORCH pin is enabled, below example control brightness only, | ||
37 | and ON / OFF will be controlled by TORCH pin. | ||
38 | |||
39 | Torch Example: | ||
40 | OFF : #echo 0 > sys/class/leds/torch/brightness | ||
41 | 46.88 mA: #echo 1 > sys/class/leds/torch/brightness | ||
42 | ... ..... | ||
43 | 375 mA : #echo 8 > sys/class/leds/torch/brightness | ||
44 | |||
45 | INDICATOR MODE | ||
46 | Indicator pattern can be set through sys/class/leds/indicator/pattern file, | ||
47 | and 4 patterns are pre-defined in indicator_pattern array. | ||
48 | According to N-lank, Pulse time and N Period values, different pattern wiill | ||
49 | be generated.If you want new patterns for your own device, change | ||
50 | indicator_pattern array with your own values and INDIC_PATTERN_SIZE. | ||
51 | Please refer datasheet for more detail about N-Blank, Pulse time and N Period. | ||
52 | |||
53 | Indicator pattern example: | ||
54 | pattern 0: #echo 0 > sys/class/leds/indicator/pattern | ||
55 | .... | ||
56 | pattern 3: #echo 3 > sys/class/leds/indicator/pattern | ||
57 | |||
58 | Indicator brightness can be controlled through | ||
59 | sys/class/leds/indicator/brightness file. | ||
60 | |||
61 | Example: | ||
62 | OFF : #echo 0 > sys/class/leds/indicator/brightness | ||
63 | 5.86 mA : #echo 1 > sys/class/leds/indicator/brightness | ||
64 | ........ | ||
65 | 46.875mA : #echo 8 > sys/class/leds/indicator/brightness | ||
66 | |||
67 | Notes | ||
68 | ----- | ||
69 | Driver expects it is registered using the i2c_board_info mechanism. | ||
70 | To register the chip at address 0x63 on specific adapter, set the platform data | ||
71 | according to include/linux/platform_data/leds-lm3556.h, set the i2c board info | ||
72 | |||
73 | Example: | ||
74 | static struct i2c_board_info __initdata board_i2c_ch4[] = { | ||
75 | { | ||
76 | I2C_BOARD_INFO(LM3556_NAME, 0x63), | ||
77 | .platform_data = &lm3556_pdata, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | and register it in the platform init function | ||
82 | |||
83 | Example: | ||
84 | board_register_i2c_bus(4, 400, | ||
85 | board_i2c_ch4, ARRAY_SIZE(board_i2c_ch4)); | ||