diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-09 11:59:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-09 11:59:39 -0400 |
commit | 8a3367cc8005842efcefc0cb5c29780370818572 (patch) | |
tree | 1e672969fab002a1b5594d696b3bc23ca31a0986 /Documentation/leds/leds-lm3556.rst | |
parent | 6e2bbb688aa6d05073dd1dd0b836d9becec195c1 (diff) | |
parent | 2605085fba22792f3d4a6b856c7c5a05492d1fde (diff) |
Merge tag 'leds-for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski:
- Add a new LED common module for ti-lmu driver family
- Modify MFD ti-lmu bindings
- add ti,brightness-resolution
- add the ramp up/down property
- Add regulator support for LM36274 driver to lm363x-regulator.c
- New LED class drivers with DT bindings:
- leds-spi-byte
- leds-lm36274
- leds-lm3697 (move the support from MFD to LED subsystem)
- Simplify getting the I2C adapter of a client:
- leds-tca6507
- leds-pca955x
- Convert LED documentation to ReST
* tag 'leds-for-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
dt: leds-lm36274.txt: fix a broken reference to ti-lmu.txt
docs: leds: convert to ReST
leds: leds-tca6507: simplify getting the adapter of a client
leds: leds-pca955x: simplify getting the adapter of a client
leds: lm36274: Introduce the TI LM36274 LED driver
dt-bindings: leds: Add LED bindings for the LM36274
regulator: lm363x: Add support for LM36274
mfd: ti-lmu: Add LM36274 support to the ti-lmu
dt-bindings: mfd: Add lm36274 bindings to ti-lmu
leds: max77650: Remove set but not used variable 'parent'
leds: avoid flush_work in atomic context
leds: lm3697: Introduce the lm3697 driver
mfd: ti-lmu: Remove support for LM3697
dt-bindings: ti-lmu: Modify dt bindings for the LM3697
leds: TI LMU: Add common code for TI LMU devices
leds: spi-byte: add single byte SPI LED driver
dt-bindings: leds: Add binding for spi-byte LED.
dt-bindings: mfd: LMU: Add ti,brightness-resolution
dt-bindings: mfd: LMU: Add the ramp up/down property
Diffstat (limited to 'Documentation/leds/leds-lm3556.rst')
-rw-r--r-- | Documentation/leds/leds-lm3556.rst | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/Documentation/leds/leds-lm3556.rst b/Documentation/leds/leds-lm3556.rst new file mode 100644 index 000000000000..1ef17d7d800e --- /dev/null +++ b/Documentation/leds/leds-lm3556.rst | |||
@@ -0,0 +1,137 @@ | |||
1 | ======================== | ||
2 | Kernel driver for lm3556 | ||
3 | ======================== | ||
4 | |||
5 | * Texas Instrument: | ||
6 | 1.5 A Synchronous Boost LED Flash Driver w/ High-Side Current Source | ||
7 | * Datasheet: http://www.national.com/ds/LM/LM3556.pdf | ||
8 | |||
9 | Authors: | ||
10 | - Daniel Jeong | ||
11 | |||
12 | Contact:Daniel Jeong(daniel.jeong-at-ti.com, gshark.jeong-at-gmail.com) | ||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | There are 3 functions in LM3556, Flash, Torch and Indicator. | ||
17 | |||
18 | Flash Mode | ||
19 | ^^^^^^^^^^ | ||
20 | |||
21 | In Flash Mode, the LED current source(LED) provides 16 target current levels | ||
22 | from 93.75 mA to 1500 mA.The Flash currents are adjusted via the CURRENT | ||
23 | CONTROL REGISTER(0x09).Flash mode is activated by the ENABLE REGISTER(0x0A), | ||
24 | or by pulling the STROBE pin HIGH. | ||
25 | |||
26 | LM3556 Flash can be controlled through sys/class/leds/flash/brightness file | ||
27 | |||
28 | * if STROBE pin is enabled, below example control brightness only, and | ||
29 | ON / OFF will be controlled by STROBE pin. | ||
30 | |||
31 | Flash Example: | ||
32 | |||
33 | OFF:: | ||
34 | |||
35 | #echo 0 > sys/class/leds/flash/brightness | ||
36 | |||
37 | 93.75 mA:: | ||
38 | |||
39 | #echo 1 > sys/class/leds/flash/brightness | ||
40 | |||
41 | ... | ||
42 | |||
43 | 1500 mA:: | ||
44 | |||
45 | #echo 16 > sys/class/leds/flash/brightness | ||
46 | |||
47 | Torch Mode | ||
48 | ^^^^^^^^^^ | ||
49 | |||
50 | In Torch Mode, the current source(LED) is programmed via the CURRENT CONTROL | ||
51 | REGISTER(0x09).Torch Mode is activated by the ENABLE REGISTER(0x0A) or by the | ||
52 | hardware TORCH input. | ||
53 | |||
54 | LM3556 torch can be controlled through sys/class/leds/torch/brightness file. | ||
55 | * if TORCH pin is enabled, below example control brightness only, | ||
56 | and ON / OFF will be controlled by TORCH pin. | ||
57 | |||
58 | Torch Example: | ||
59 | |||
60 | OFF:: | ||
61 | |||
62 | #echo 0 > sys/class/leds/torch/brightness | ||
63 | |||
64 | 46.88 mA:: | ||
65 | |||
66 | #echo 1 > sys/class/leds/torch/brightness | ||
67 | |||
68 | ... | ||
69 | |||
70 | 375 mA:: | ||
71 | |||
72 | #echo 8 > sys/class/leds/torch/brightness | ||
73 | |||
74 | Indicator Mode | ||
75 | ^^^^^^^^^^^^^^ | ||
76 | |||
77 | Indicator pattern can be set through sys/class/leds/indicator/pattern file, | ||
78 | and 4 patterns are pre-defined in indicator_pattern array. | ||
79 | |||
80 | According to N-lank, Pulse time and N Period values, different pattern wiill | ||
81 | be generated.If you want new patterns for your own device, change | ||
82 | indicator_pattern array with your own values and INDIC_PATTERN_SIZE. | ||
83 | |||
84 | Please refer datasheet for more detail about N-Blank, Pulse time and N Period. | ||
85 | |||
86 | Indicator pattern example: | ||
87 | |||
88 | pattern 0:: | ||
89 | |||
90 | #echo 0 > sys/class/leds/indicator/pattern | ||
91 | |||
92 | ... | ||
93 | |||
94 | pattern 3:: | ||
95 | |||
96 | #echo 3 > sys/class/leds/indicator/pattern | ||
97 | |||
98 | Indicator brightness can be controlled through | ||
99 | sys/class/leds/indicator/brightness file. | ||
100 | |||
101 | Example: | ||
102 | |||
103 | OFF:: | ||
104 | |||
105 | #echo 0 > sys/class/leds/indicator/brightness | ||
106 | |||
107 | 5.86 mA:: | ||
108 | |||
109 | #echo 1 > sys/class/leds/indicator/brightness | ||
110 | |||
111 | ... | ||
112 | |||
113 | 46.875mA:: | ||
114 | |||
115 | #echo 8 > sys/class/leds/indicator/brightness | ||
116 | |||
117 | Notes | ||
118 | ----- | ||
119 | Driver expects it is registered using the i2c_board_info mechanism. | ||
120 | To register the chip at address 0x63 on specific adapter, set the platform data | ||
121 | according to include/linux/platform_data/leds-lm3556.h, set the i2c board info | ||
122 | |||
123 | Example:: | ||
124 | |||
125 | static struct i2c_board_info board_i2c_ch4[] __initdata = { | ||
126 | { | ||
127 | I2C_BOARD_INFO(LM3556_NAME, 0x63), | ||
128 | .platform_data = &lm3556_pdata, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | and register it in the platform init function | ||
133 | |||
134 | Example:: | ||
135 | |||
136 | board_register_i2c_bus(4, 400, | ||
137 | board_i2c_ch4, ARRAY_SIZE(board_i2c_ch4)); | ||