aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/lp855x.h
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2013-02-21 19:44:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 20:22:25 -0500
commit26e8ccc223ebfd2047a96074f142544dc7062cfe (patch)
tree5bb294732ee8502a139d578d61d1faaae2031618 /include/linux/platform_data/lp855x.h
parent68853bc2b360c06094477523f7d28efd2d9e3bf3 (diff)
backlight: lp855x_bl: support new LP8557 device
LP8557 is one of LP855x family device, but it has different register map and initialization process. To support this device, device specific configuration is done through the lp855x_device_config structure. Few register definitions are fixed for better readability. BRIGHTNESS_CTRL -> LP855X_BRIGHTNESS_CTRL DEVICE_CTRL -> LP855X_DEVICE_CTRL EEPROM_START -> LP855X_EEPROM_START EEPROM_END -> LP855X_EEPROM_END EPROM_START -> LP8556_EPROM_START EPROM_END -> LP8556_EPROM_END And LP8557 register definitions are added. New register function, lp855x_update_bit() is added. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/platform_data/lp855x.h')
-rw-r--r--include/linux/platform_data/lp855x.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/platform_data/lp855x.h b/include/linux/platform_data/lp855x.h
index e81f62d24ee2..20ee8b221dbd 100644
--- a/include/linux/platform_data/lp855x.h
+++ b/include/linux/platform_data/lp855x.h
@@ -49,12 +49,24 @@
49#define LP8556_FAST_CONFIG BIT(7) /* use it if EPROMs should be maintained 49#define LP8556_FAST_CONFIG BIT(7) /* use it if EPROMs should be maintained
50 when exiting the low power mode */ 50 when exiting the low power mode */
51 51
52/* CONFIG register - LP8557 */
53#define LP8557_PWM_STANDBY BIT(7)
54#define LP8557_PWM_FILTER BIT(6)
55#define LP8557_RELOAD_EPROM BIT(3) /* use it if EPROMs should be reset
56 when the backlight turns on */
57#define LP8557_OFF_OPENLEDS BIT(2)
58#define LP8557_PWM_CONFIG LP8557_PWM_ONLY
59#define LP8557_I2C_CONFIG LP8557_I2C_ONLY
60#define LP8557_COMB1_CONFIG LP8557_COMBINED1
61#define LP8557_COMB2_CONFIG LP8557_COMBINED2
62
52enum lp855x_chip_id { 63enum lp855x_chip_id {
53 LP8550, 64 LP8550,
54 LP8551, 65 LP8551,
55 LP8552, 66 LP8552,
56 LP8553, 67 LP8553,
57 LP8556, 68 LP8556,
69 LP8557,
58}; 70};
59 71
60enum lp855x_brightness_ctrl_mode { 72enum lp855x_brightness_ctrl_mode {
@@ -89,6 +101,13 @@ enum lp8556_brightness_source {
89 LP8556_COMBINED2, /* pwm + i2c after the shaper block */ 101 LP8556_COMBINED2, /* pwm + i2c after the shaper block */
90}; 102};
91 103
104enum lp8557_brightness_source {
105 LP8557_PWM_ONLY,
106 LP8557_I2C_ONLY,
107 LP8557_COMBINED1, /* pwm + i2c after the shaper block */
108 LP8557_COMBINED2, /* pwm + i2c before the shaper block */
109};
110
92struct lp855x_rom_data { 111struct lp855x_rom_data {
93 u8 addr; 112 u8 addr;
94 u8 val; 113 u8 val;