diff options
Diffstat (limited to 'include/linux/platform_data/lm3630_bl.h')
-rw-r--r-- | include/linux/platform_data/lm3630_bl.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/platform_data/lm3630_bl.h b/include/linux/platform_data/lm3630_bl.h new file mode 100644 index 00000000000..9176dd3f2d6 --- /dev/null +++ b/include/linux/platform_data/lm3630_bl.h | |||
@@ -0,0 +1,57 @@ | |||
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_LM3630_H | ||
12 | #define __LINUX_LM3630_H | ||
13 | |||
14 | #define LM3630_NAME "lm3630_bl" | ||
15 | |||
16 | enum lm3630_pwm_ctrl { | ||
17 | PWM_CTRL_DISABLE = 0, | ||
18 | PWM_CTRL_BANK_A, | ||
19 | PWM_CTRL_BANK_B, | ||
20 | PWM_CTRL_BANK_ALL, | ||
21 | }; | ||
22 | |||
23 | enum lm3630_pwm_active { | ||
24 | PWM_ACTIVE_HIGH = 0, | ||
25 | PWM_ACTIVE_LOW, | ||
26 | }; | ||
27 | |||
28 | enum lm3630_bank_a_ctrl { | ||
29 | BANK_A_CTRL_DISABLE = 0x0, | ||
30 | BANK_A_CTRL_LED1 = 0x4, | ||
31 | BANK_A_CTRL_LED2 = 0x1, | ||
32 | BANK_A_CTRL_ALL = 0x5, | ||
33 | }; | ||
34 | |||
35 | enum lm3630_bank_b_ctrl { | ||
36 | BANK_B_CTRL_DISABLE = 0, | ||
37 | BANK_B_CTRL_LED2, | ||
38 | }; | ||
39 | |||
40 | struct lm3630_platform_data { | ||
41 | |||
42 | /* maximum brightness */ | ||
43 | int max_brt_led1; | ||
44 | int max_brt_led2; | ||
45 | |||
46 | /* initial on brightness */ | ||
47 | int init_brt_led1; | ||
48 | int init_brt_led2; | ||
49 | enum lm3630_pwm_ctrl pwm_ctrl; | ||
50 | enum lm3630_pwm_active pwm_active; | ||
51 | enum lm3630_bank_a_ctrl bank_a_ctrl; | ||
52 | enum lm3630_bank_b_ctrl bank_b_ctrl; | ||
53 | unsigned int pwm_period; | ||
54 | void (*pwm_set_intensity) (int brightness, int max_brightness); | ||
55 | }; | ||
56 | |||
57 | #endif /* __LINUX_LM3630_H */ | ||