Commit | Line | Data |
---|---|---|
6fa3eb70 S |
1 | #ifndef _CUST_LEDS_DEF_H |
2 | #define _CUST_LEDS_DEF_H | |
3 | ||
4 | //#define CUST_LEDS_BACKLIGHT_PMIC_PARA /* parallel */ | |
5 | //#define CUST_LEDS_BACKLIGHT_PMIC_SERI /* series */ | |
6 | enum mt65xx_led_mode | |
7 | { | |
8 | MT65XX_LED_MODE_NONE, | |
9 | MT65XX_LED_MODE_PWM, | |
10 | MT65XX_LED_MODE_GPIO, | |
11 | MT65XX_LED_MODE_PMIC, | |
12 | //MT65XX_LED_MODE_CUST, | |
13 | MT65XX_LED_MODE_CUST_LCM, | |
14 | MT65XX_LED_MODE_CUST_BLS_PWM | |
15 | }; | |
16 | ||
17 | enum mt65xx_led_pmic | |
18 | { | |
19 | MT65XX_LED_PMIC_LCD_ISINK=0, | |
20 | MT65XX_LED_PMIC_NLED_ISINK0, | |
21 | MT65XX_LED_PMIC_NLED_ISINK1, | |
22 | MT65XX_LED_PMIC_NLED_ISINK2, | |
23 | MT65XX_LED_PMIC_NLED_ISINK3 | |
24 | }; | |
25 | struct PWM_config | |
26 | { | |
27 | int clock_source; | |
28 | int div; | |
29 | int low_duration; | |
30 | int High_duration; | |
31 | BOOL pmic_pad; | |
32 | }; | |
33 | typedef int (*cust_brightness_set)(int level, int div); | |
34 | typedef int (*cust_set_brightness)(int level); | |
35 | ||
36 | /* | |
37 | * name : must the same as lights HAL | |
38 | * mode : control mode | |
39 | * data : | |
40 | * PWM: pwm number | |
41 | * GPIO: gpio id | |
42 | * PMIC: enum mt65xx_led_pmic | |
43 | * CUST: custom set brightness function pointer | |
44 | */ | |
45 | struct cust_mt65xx_led { | |
46 | char *name; | |
47 | enum mt65xx_led_mode mode; | |
48 | int data; | |
49 | struct PWM_config config_data; | |
50 | }; | |
51 | ||
52 | extern struct cust_mt65xx_led *get_cust_led_list(void); | |
53 | #endif /* _CUST_LEDS_DEF_H */ |