Go to the documentation of this file.
10 #ifndef __LINUX_I2C_ADP8870_H
11 #define __LINUX_I2C_ADP8870_H
13 #define ID_ADP8870 8870
15 #define ADP8870_MAX_BRIGHTNESS 0x7F
16 #define FLAG_OFFT_SHIFT 8
22 #define ADP8870_LED_DIS_BLINK (0 << FLAG_OFFT_SHIFT)
23 #define ADP8870_LED_OFFT_600ms (1 << FLAG_OFFT_SHIFT)
24 #define ADP8870_LED_OFFT_1200ms (2 << FLAG_OFFT_SHIFT)
25 #define ADP8870_LED_OFFT_1800ms (3 << FLAG_OFFT_SHIFT)
27 #define ADP8870_LED_ONT_200ms 0
28 #define ADP8870_LED_ONT_600ms 1
29 #define ADP8870_LED_ONT_800ms 2
30 #define ADP8870_LED_ONT_1200ms 3
32 #define ADP8870_LED_D7 (7)
33 #define ADP8870_LED_D6 (6)
34 #define ADP8870_LED_D5 (5)
35 #define ADP8870_LED_D4 (4)
36 #define ADP8870_LED_D3 (3)
37 #define ADP8870_LED_D2 (2)
38 #define ADP8870_LED_D1 (1)
44 #define ADP8870_BL_D7 (1 << 6)
45 #define ADP8870_BL_D6 (1 << 5)
46 #define ADP8870_BL_D5 (1 << 4)
47 #define ADP8870_BL_D4 (1 << 3)
48 #define ADP8870_BL_D3 (1 << 2)
49 #define ADP8870_BL_D2 (1 << 1)
50 #define ADP8870_BL_D1 (1 << 0)
52 #define ADP8870_FADE_T_DIS 0
53 #define ADP8870_FADE_T_300ms 1
54 #define ADP8870_FADE_T_600ms 2
55 #define ADP8870_FADE_T_900ms 3
56 #define ADP8870_FADE_T_1200ms 4
57 #define ADP8870_FADE_T_1500ms 5
58 #define ADP8870_FADE_T_1800ms 6
59 #define ADP8870_FADE_T_2100ms 7
60 #define ADP8870_FADE_T_2400ms 8
61 #define ADP8870_FADE_T_2700ms 9
62 #define ADP8870_FADE_T_3000ms 10
63 #define ADP8870_FADE_T_3500ms 11
64 #define ADP8870_FADE_T_4000ms 12
65 #define ADP8870_FADE_T_4500ms 13
66 #define ADP8870_FADE_T_5000ms 14
67 #define ADP8870_FADE_T_5500ms 15
69 #define ADP8870_FADE_LAW_LINEAR 0
70 #define ADP8870_FADE_LAW_SQUARE 1
71 #define ADP8870_FADE_LAW_CUBIC1 2
72 #define ADP8870_FADE_LAW_CUBIC2 3
74 #define ADP8870_BL_AMBL_FILT_80ms 0
75 #define ADP8870_BL_AMBL_FILT_160ms 1
76 #define ADP8870_BL_AMBL_FILT_320ms 2
77 #define ADP8870_BL_AMBL_FILT_640ms 3
78 #define ADP8870_BL_AMBL_FILT_1280ms 4
79 #define ADP8870_BL_AMBL_FILT_2560ms 5
80 #define ADP8870_BL_AMBL_FILT_5120ms 6
81 #define ADP8870_BL_AMBL_FILT_10240ms 7
86 #define ADP8870_BL_CUR_mA(I) ((I * 127) / 30)
91 #define ADP8870_L2_COMP_CURR_uA(I) ((I * 255) / 1106)
96 #define ADP8870_L3_COMP_CURR_uA(I) ((I * 255) / 551)
101 #define ADP8870_L4_COMP_CURR_uA(I) ((I * 255) / 275)
106 #define ADP8870_L5_COMP_CURR_uA(I) ((I * 255) / 138)