diff options
author | G.Shark Jeong <gshark.jeong@gmail.com> | 2012-10-04 20:12:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-05 14:04:53 -0400 |
commit | 0f59858d511960caefb42c4535dc73c2c5f3136c (patch) | |
tree | dd0936348366a9f9b7d03d5706a50217eab89e09 /include | |
parent | 0c2a665a648ea74879ce6333d3a31a96a7c361ce (diff) |
backlight: add new lm3639 backlight driver
This driver is a general version for LM3639 backlgiht + flash driver chip
of TI.
LM3639:
The LM3639 is a single chip LCD Display Backlight driver + white LED
Camera driver. Programming is done over an I2C compatible interface.
www.ti.com
[akpm@linux-foundation.org: code layout tweaks]
Signed-off-by: G.Shark Jeong <gshark.jeong@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/lm3639_bl.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/include/linux/platform_data/lm3639_bl.h b/include/linux/platform_data/lm3639_bl.h new file mode 100644 index 000000000000..5234cd5ed166 --- /dev/null +++ b/include/linux/platform_data/lm3639_bl.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * Simple driver for Texas Instruments LM3630 LED Flash driver chip | ||
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_LM3639_H | ||
12 | #define __LINUX_LM3639_H | ||
13 | |||
14 | #define LM3639_NAME "lm3639_bl" | ||
15 | |||
16 | enum lm3639_pwm { | ||
17 | LM3639_PWM_DISABLE = 0x00, | ||
18 | LM3639_PWM_EN_ACTLOW = 0x48, | ||
19 | LM3639_PWM_EN_ACTHIGH = 0x40, | ||
20 | }; | ||
21 | |||
22 | enum lm3639_strobe { | ||
23 | LM3639_STROBE_DISABLE = 0x00, | ||
24 | LM3639_STROBE_EN_ACTLOW = 0x10, | ||
25 | LM3639_STROBE_EN_ACTHIGH = 0x30, | ||
26 | }; | ||
27 | |||
28 | enum lm3639_txpin { | ||
29 | LM3639_TXPIN_DISABLE = 0x00, | ||
30 | LM3639_TXPIN_EN_ACTLOW = 0x04, | ||
31 | LM3639_TXPIN_EN_ACTHIGH = 0x0C, | ||
32 | }; | ||
33 | |||
34 | enum lm3639_fleds { | ||
35 | LM3639_FLED_DIASBLE_ALL = 0x00, | ||
36 | LM3639_FLED_EN_1 = 0x40, | ||
37 | LM3639_FLED_EN_2 = 0x20, | ||
38 | LM3639_FLED_EN_ALL = 0x60, | ||
39 | }; | ||
40 | |||
41 | enum lm3639_bleds { | ||
42 | LM3639_BLED_DIASBLE_ALL = 0x00, | ||
43 | LM3639_BLED_EN_1 = 0x10, | ||
44 | LM3639_BLED_EN_2 = 0x08, | ||
45 | LM3639_BLED_EN_ALL = 0x18, | ||
46 | }; | ||
47 | enum lm3639_bled_mode { | ||
48 | LM3639_BLED_MODE_EXPONETIAL = 0x00, | ||
49 | LM3639_BLED_MODE_LINEAR = 0x10, | ||
50 | }; | ||
51 | |||
52 | struct lm3639_platform_data { | ||
53 | unsigned int max_brt_led; | ||
54 | unsigned int init_brt_led; | ||
55 | |||
56 | /* input pins */ | ||
57 | enum lm3639_pwm pin_pwm; | ||
58 | enum lm3639_strobe pin_strobe; | ||
59 | enum lm3639_txpin pin_tx; | ||
60 | |||
61 | /* output pins */ | ||
62 | enum lm3639_fleds fled_pins; | ||
63 | enum lm3639_bleds bled_pins; | ||
64 | enum lm3639_bled_mode bled_mode; | ||
65 | |||
66 | void (*pwm_set_intensity) (int brightness, int max_brightness); | ||
67 | int (*pwm_get_intensity) (void); | ||
68 | }; | ||
69 | #endif /* __LINUX_LM3639_H */ | ||