Lines Matching +full:0 +full:- +full:127
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
20 #define ADP5520_MODE_STATUS 0x00
21 #define ADP5520_INTERRUPT_ENABLE 0x01
22 #define ADP5520_BL_CONTROL 0x02
23 #define ADP5520_BL_TIME 0x03
24 #define ADP5520_BL_FADE 0x04
25 #define ADP5520_DAYLIGHT_MAX 0x05
26 #define ADP5520_DAYLIGHT_DIM 0x06
27 #define ADP5520_OFFICE_MAX 0x07
28 #define ADP5520_OFFICE_DIM 0x08
29 #define ADP5520_DARK_MAX 0x09
30 #define ADP5520_DARK_DIM 0x0A
31 #define ADP5520_BL_VALUE 0x0B
32 #define ADP5520_ALS_CMPR_CFG 0x0C
33 #define ADP5520_L2_TRIP 0x0D
34 #define ADP5520_L2_HYS 0x0E
35 #define ADP5520_L3_TRIP 0x0F
36 #define ADP5520_L3_HYS 0x10
37 #define ADP5520_LED_CONTROL 0x11
38 #define ADP5520_LED_TIME 0x12
39 #define ADP5520_LED_FADE 0x13
40 #define ADP5520_LED1_CURRENT 0x14
41 #define ADP5520_LED2_CURRENT 0x15
42 #define ADP5520_LED3_CURRENT 0x16
48 #define ADP5520_GPIO_CFG_1 0x17
49 #define ADP5520_GPIO_CFG_2 0x18
50 #define ADP5520_GPIO_IN 0x19
51 #define ADP5520_GPIO_OUT 0x1A
52 #define ADP5520_GPIO_INT_EN 0x1B
53 #define ADP5520_GPIO_INT_STAT 0x1C
54 #define ADP5520_GPIO_INT_LVL 0x1D
55 #define ADP5520_GPIO_DEBOUNCE 0x1E
56 #define ADP5520_GPIO_PULLUP 0x1F
57 #define ADP5520_KP_INT_STAT_1 0x20
58 #define ADP5520_KP_INT_STAT_2 0x21
59 #define ADP5520_KR_INT_STAT_1 0x22
60 #define ADP5520_KR_INT_STAT_2 0x23
61 #define ADP5520_KEY_STAT_1 0x24
62 #define ADP5520_KEY_STAT_2 0x25
75 #define ADP5520_KP_INT (1 << 0)
85 #define ADP5520_KP_IEN (1 << 0)
96 #define ADP5520_KP_BL_EN (1 << 0)
106 #define ADP5020_MAX_BRIGHTNESS 0x7F
108 #define FADE_VAL(in, out) ((0xF & (in)) | ((0xF & (out)) << 4))
109 #define BL_CTRL_VAL(law, auto) (((1 & (auto)) << 3) | ((0x3 & (law)) << 4))
110 #define ALS_CMPR_CFG_VAL(filt, l3_en) (((0x7 & filt) << 5) | l3_en)
118 #define ADP5520_FLAG_LED_MASK 0x3
120 #define ADP5520_FLAG_OFFT_MASK 0x3
127 #define ADP5520_LED1_EN (1 << 0)
142 #define ADP5520_GPIO_R0 (1 << 0)
163 #define ADP5520_ROW_R0 (1 << 0)
185 #define ADP5520_LED_DIS_BLINK (0 << ADP5520_FLAG_OFFT_SHIFT)
190 #define ADP5520_LED_ONT_200ms 0
198 u8 fade_in; /* Backlight Fade-In Timer */
199 u8 fade_out; /* Backlight Fade-Out Timer */
207 #define ADP5520_FADE_T_DIS 0 /* Fade Timer Disabled */
224 #define ADP5520_BL_LAW_LINEAR 0
229 #define ADP5520_BL_AMBL_FILT_80ms 0 /* Light sensor filter time */
239 * Blacklight current 0..30mA
241 #define ADP5520_BL_CUR_mA(I) ((I * 127) / 30)
244 * L2 comparator current 0..1000uA
249 * L3 comparator current 0..127uA
251 #define ADP5520_L3_COMP_CURR_uA(I) ((I * 255) / 127)
254 u8 fade_in; /* Backlight Fade-In Timer */
255 u8 fade_out; /* Backlight Fade-Out Timer */
256 u8 fade_led_law; /* fade-on/fade-off transfer characteristic */
260 u8 l1_daylight_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
261 u8 l1_daylight_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
262 u8 l2_office_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
263 u8 l2_office_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
264 u8 l3_dark_max; /* use BL_CUR_mA(I) 0 <= I <= 30 mA */
265 u8 l3_dark_dim; /* typ = 0, use BL_CUR_mA(I) 0 <= I <= 30 mA */
266 u8 l2_trip; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1000 uA */
267 u8 l2_hyst; /* use L2_COMP_CURR_uA(I) 0 <= I <= 1000 uA */
268 u8 l3_trip; /* use L3_COMP_CURR_uA(I) 0 <= I <= 127 uA */
269 u8 l3_hyst; /* use L3_COMP_CURR_uA(I) 0 <= I <= 127 uA */