1
2
3
4
5
6
7 #ifndef __LINUX_LM3639_H
8 #define __LINUX_LM3639_H
9
10 #define LM3639_NAME "lm3639_bl"
11
12 enum lm3639_pwm {
13 LM3639_PWM_DISABLE = 0x00,
14 LM3639_PWM_EN_ACTLOW = 0x48,
15 LM3639_PWM_EN_ACTHIGH = 0x40,
16 };
17
18 enum lm3639_strobe {
19 LM3639_STROBE_DISABLE = 0x00,
20 LM3639_STROBE_EN_ACTLOW = 0x10,
21 LM3639_STROBE_EN_ACTHIGH = 0x30,
22 };
23
24 enum lm3639_txpin {
25 LM3639_TXPIN_DISABLE = 0x00,
26 LM3639_TXPIN_EN_ACTLOW = 0x04,
27 LM3639_TXPIN_EN_ACTHIGH = 0x0C,
28 };
29
30 enum lm3639_fleds {
31 LM3639_FLED_DIASBLE_ALL = 0x00,
32 LM3639_FLED_EN_1 = 0x40,
33 LM3639_FLED_EN_2 = 0x20,
34 LM3639_FLED_EN_ALL = 0x60,
35 };
36
37 enum lm3639_bleds {
38 LM3639_BLED_DIASBLE_ALL = 0x00,
39 LM3639_BLED_EN_1 = 0x10,
40 LM3639_BLED_EN_2 = 0x08,
41 LM3639_BLED_EN_ALL = 0x18,
42 };
43 enum lm3639_bled_mode {
44 LM3639_BLED_MODE_EXPONETIAL = 0x00,
45 LM3639_BLED_MODE_LINEAR = 0x10,
46 };
47
48 struct lm3639_platform_data {
49 unsigned int max_brt_led;
50 unsigned int init_brt_led;
51
52
53 enum lm3639_pwm pin_pwm;
54 enum lm3639_strobe pin_strobe;
55 enum lm3639_txpin pin_tx;
56
57
58 enum lm3639_fleds fled_pins;
59 enum lm3639_bleds bled_pins;
60 enum lm3639_bled_mode bled_mode;
61
62 void (*pwm_set_intensity) (int brightness, int max_brightness);
63 int (*pwm_get_intensity) (void);
64 };
65 #endif