Skip to content

Commit 7077602

Browse files
jfischer-nogalak
authored andcommitted
drivers: apds9960: fix ALS in non-trigger mode
Generate interrupt on every ALS cycle in non-trigger mode and enable ALS saturation interrupt. resolves: #11989 Signed-off-by: Johann Fischer <[email protected]>
1 parent 516899c commit 7077602

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/sensor/apds9960/apds9960.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@
184184
#define APDS9960_DEFAULT_WTIME 255
185185
#define APDS9960_DEFAULT_CONFIG1 0x60
186186
#define APDS9960_DEFAULT_AGAIN APDS9960_AGAIN_4X
187-
#define APDS9960_DEFAULT_PERS 0x11
188-
#define APDS9960_DEFAULT_CONFIG2 0x01
187+
#define APDS9960_DEFAULT_PERS BIT(4)
188+
#define APDS9960_DEFAULT_CONFIG2 (BIT(6) | BIT(0))
189189
#define APDS9960_DEFAULT_PROX_PPULSE 0x87
190190
#define APDS9960_DEFAULT_GESTURE_PPULSE 0x89
191191
#define APDS9960_DEFAULT_POFFSET_UR 0
@@ -207,7 +207,6 @@
207207
#define APDS9960_DEFAULT_CONFIG3 APDS9960_CONFIG3_SAI
208208
#endif
209209

210-
#define APDS9960_DEFAULT_CONFIG2 0x01
211210
#define APDS9960_DEFAULT_GPENTH 40
212211
#define APDS9960_DEFAULT_GEXTH 30
213212
#define APDS9960_DEFAULT_GCONF1 0x40

0 commit comments

Comments
 (0)