diff options
| author | G.Shark Jeong <gshark.jeong@gmail.com> | 2012-09-05 03:05:58 -0400 |
|---|---|---|
| committer | Bryan Wu <bryan.wu@canonical.com> | 2012-09-11 06:32:43 -0400 |
| commit | b98d13c725920e9ab7696e0d7d19c4db1bdf6737 (patch) | |
| tree | 024bbd7b47d783f94b7f9fed71f25b406d31727c /include/linux/platform_data | |
| parent | 56a1e9adc83870ae9ad9ff1bf9fd8bccebdfe065 (diff) | |
leds: Add new LED driver for lm355x chips
This driver is a general version for LM355x,lm3554 and lm3556,led chips of TI.
LM3554 :
The LM3554 is a 2 MHz fixed-frequency synchronous boost
converter with 1.2A dual high side led drivers.
Datasheet: www.ti.com/lit/ds/symlink/lm3554.pdf
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
(bryan.wu@canonical.com: use flush_work() to replace flush_work_sync() which is
deprecated)
Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/leds-lm3556.h | 50 | ||||
| -rw-r--r-- | include/linux/platform_data/leds-lm355x.h | 66 |
2 files changed, 66 insertions, 50 deletions
diff --git a/include/linux/platform_data/leds-lm3556.h b/include/linux/platform_data/leds-lm3556.h deleted file mode 100644 index 4b4e7d6b0527..000000000000 --- a/include/linux/platform_data/leds-lm3556.h +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Simple driver for Texas Instruments LM3556 LED Flash driver chip (Rev0x03) | ||
| 3 | * Copyright (C) 2012 Texas Instruments | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | */ | ||
| 10 | |||
| 11 | #ifndef __LINUX_LM3556_H | ||
| 12 | #define __LINUX_LM3556_H | ||
| 13 | |||
| 14 | #define LM3556_NAME "leds-lm3556" | ||
| 15 | |||
| 16 | enum lm3556_pin_polarity { | ||
| 17 | PIN_LOW_ACTIVE = 0, | ||
| 18 | PIN_HIGH_ACTIVE, | ||
| 19 | }; | ||
| 20 | |||
| 21 | enum lm3556_pin_enable { | ||
| 22 | PIN_DISABLED = 0, | ||
| 23 | PIN_ENABLED, | ||
| 24 | }; | ||
| 25 | |||
| 26 | enum lm3556_strobe_usuage { | ||
| 27 | STROBE_EDGE_DETECT = 0, | ||
| 28 | STROBE_LEVEL_DETECT, | ||
| 29 | }; | ||
| 30 | |||
| 31 | enum lm3556_indic_mode { | ||
| 32 | INDIC_MODE_INTERNAL = 0, | ||
| 33 | INDIC_MODE_EXTERNAL, | ||
| 34 | }; | ||
| 35 | |||
| 36 | struct lm3556_platform_data { | ||
| 37 | enum lm3556_pin_enable torch_pin_en; | ||
| 38 | enum lm3556_pin_polarity torch_pin_polarity; | ||
| 39 | |||
| 40 | enum lm3556_strobe_usuage strobe_usuage; | ||
| 41 | enum lm3556_pin_enable strobe_pin_en; | ||
| 42 | enum lm3556_pin_polarity strobe_pin_polarity; | ||
| 43 | |||
| 44 | enum lm3556_pin_enable tx_pin_en; | ||
| 45 | enum lm3556_pin_polarity tx_pin_polarity; | ||
| 46 | |||
| 47 | enum lm3556_indic_mode indicator_mode; | ||
| 48 | }; | ||
| 49 | |||
| 50 | #endif /* __LINUX_LM3556_H */ | ||
diff --git a/include/linux/platform_data/leds-lm355x.h b/include/linux/platform_data/leds-lm355x.h new file mode 100644 index 000000000000..b88724bb0b46 --- /dev/null +++ b/include/linux/platform_data/leds-lm355x.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2012 Texas Instruments | ||
| 3 | * | ||
| 4 | * License Terms: GNU General Public License v2 | ||
| 5 | * | ||
| 6 | * Simple driver for Texas Instruments LM355x LED driver chip | ||
| 7 | * | ||
| 8 | * Author: G.Shark Jeong <gshark.jeong@gmail.com> | ||
| 9 | * Daniel Jeong <daniel.jeong@ti.com> | ||
| 10 | */ | ||
| 11 | |||
| 12 | #define LM355x_NAME "leds-lm355x" | ||
| 13 | #define LM3554_NAME "leds-lm3554" | ||
| 14 | #define LM3556_NAME "leds-lm3556" | ||
| 15 | |||
| 16 | /* lm3554 : strobe def. on */ | ||
| 17 | enum lm355x_strobe { | ||
| 18 | LM355x_PIN_STROBE_DISABLE = 0x00, | ||
| 19 | LM355x_PIN_STROBE_ENABLE = 0x01, | ||
| 20 | }; | ||
| 21 | |||
| 22 | enum lm355x_torch { | ||
| 23 | LM355x_PIN_TORCH_DISABLE = 0, | ||
| 24 | LM3554_PIN_TORCH_ENABLE = 0x80, | ||
| 25 | LM3556_PIN_TORCH_ENABLE = 0x10, | ||
| 26 | }; | ||
| 27 | |||
| 28 | enum lm355x_tx2 { | ||
| 29 | LM355x_PIN_TX_DISABLE = 0, | ||
| 30 | LM3554_PIN_TX_ENABLE = 0x20, | ||
| 31 | LM3556_PIN_TX_ENABLE = 0x40, | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum lm355x_ntc { | ||
| 35 | LM355x_PIN_NTC_DISABLE = 0, | ||
| 36 | LM3554_PIN_NTC_ENABLE = 0x08, | ||
| 37 | LM3556_PIN_NTC_ENABLE = 0x80, | ||
| 38 | }; | ||
| 39 | |||
| 40 | enum lm355x_pmode { | ||
| 41 | LM355x_PMODE_DISABLE = 0, | ||
| 42 | LM355x_PMODE_ENABLE = 0x04, | ||
| 43 | }; | ||
| 44 | |||
| 45 | /* | ||
| 46 | * struct lm3554_platform_data | ||
| 47 | * @pin_strobe: strobe input | ||
| 48 | * @pin_torch : input pin | ||
| 49 | * lm3554-tx1/torch/gpio1 | ||
| 50 | * lm3556-torch | ||
| 51 | * @pin_tx2 : input pin | ||
| 52 | * lm3554-envm/tx2/gpio2 | ||
| 53 | * lm3556-tx pin | ||
| 54 | * @ntc_pin : output pin | ||
| 55 | * lm3554-ledi/ntc | ||
| 56 | * lm3556-temp pin | ||
| 57 | * @pass_mode : pass mode | ||
| 58 | */ | ||
| 59 | struct lm355x_platform_data { | ||
| 60 | enum lm355x_strobe pin_strobe; | ||
| 61 | enum lm355x_torch pin_tx1; | ||
| 62 | enum lm355x_tx2 pin_tx2; | ||
| 63 | enum lm355x_ntc ntc_pin; | ||
| 64 | |||
| 65 | enum lm355x_pmode pass_mode; | ||
| 66 | }; | ||
