1 ======================== 2 Kernel driver for lm3556 3 ======================== 4 5 * Texas Instrument: 6 1.5 A Synchronous Boost LED Flash Driver w/ 7 * Datasheet: http://www.national.com/ds/LM/LM3 8 9 Authors: 10 - Daniel Jeong 11 12 Contact:Daniel Jeong(daniel.jeong-at-t 13 14 Description 15 ----------- 16 There are 3 functions in LM3556, Flash, Torch 17 18 Flash Mode 19 ^^^^^^^^^^ 20 21 In Flash Mode, the LED current source(LED) pro 22 from 93.75 mA to 1500 mA.The Flash currents ar 23 CONTROL REGISTER(0x09).Flash mode is activated 24 or by pulling the STROBE pin HIGH. 25 26 LM3556 Flash can be controlled through /sys/cl 27 28 * if STROBE pin is enabled, below example cont 29 ON / OFF will be controlled by STROBE pin. 30 31 Flash Example: 32 33 OFF:: 34 35 #echo 0 > /sys/class/leds/flash/bright 36 37 93.75 mA:: 38 39 #echo 1 > /sys/class/leds/flash/bright 40 41 ... 42 43 1500 mA:: 44 45 #echo 16 > /sys/class/leds/flash/brigh 46 47 Torch Mode 48 ^^^^^^^^^^ 49 50 In Torch Mode, the current source(LED) is prog 51 REGISTER(0x09).Torch Mode is activated by the 52 hardware TORCH input. 53 54 LM3556 torch can be controlled through /sys/cl 55 * if TORCH pin is enabled, below example contr 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/bright 63 64 46.88 mA:: 65 66 #echo 1 > /sys/class/leds/torch/bright 67 68 ... 69 70 375 mA:: 71 72 #echo 8 > /sys/class/leds/torch/bright 73 74 Indicator Mode 75 ^^^^^^^^^^^^^^ 76 77 Indicator pattern can be set through /sys/clas 78 and 4 patterns are pre-defined in indicator_pa 79 80 According to N-lank, Pulse time and N Period v 81 be generated.If you want new patterns for your 82 indicator_pattern array with your own values a 83 84 Please refer datasheet for more detail about N 85 86 Indicator pattern example: 87 88 pattern 0:: 89 90 #echo 0 > /sys/class/leds/indicator/pa 91 92 ... 93 94 pattern 3:: 95 96 #echo 3 > /sys/class/leds/indicator/pa 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/br 106 107 5.86 mA:: 108 109 #echo 1 > /sys/class/leds/indicator/br 110 111 ... 112 113 46.875mA:: 114 115 #echo 8 > /sys/class/leds/indicator/br 116 117 Notes 118 ----- 119 Driver expects it is registered using the i2c_ 120 To register the chip at address 0x63 on specif 121 according to include/linux/platform_data/leds- 122 123 Example:: 124 125 static struct i2c_board_info board_i2c 126 { 127 I2C_BOARD_INFO(LM3556 128 .platform_data = &lm3 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,
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.