Skip to content

Commit 4c9b6b6

Browse files
Audifazkartben
authored andcommitted
Sensor: VCNL4040: Update to lux/step constants
Right now, the driver uses the lux/step constants from the datasheet https://www.vishay.com/docs/84307/designingvcnl4040.pdf However, the newest datasheet from 2024 indicates that the lux/step have changed (page 12) https://www.vishay.com/docs/84274/vcnl4040.pdf Signed-off-by: Emilio Aguila Escalante <[email protected]>
1 parent 1201c24 commit 4c9b6b6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/sensor/vishay/vcnl4040/vcnl4040.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,21 +136,21 @@ static int vcnl4040_reg_setup(const struct device *dev)
136136

137137
/*
138138
* scale the lux depending on the value of the integration time
139-
* see page 8 of the VCNL4040 application note:
140-
* https://www.vishay.com/docs/84307/designingvcnl4040.pdf
139+
* see page 12 of the VCNL4040 application note:
140+
* https://www.vishay.com/docs/84274/vcnl4040.pdf
141141
*/
142142
switch (config->als_it) {
143143
case VCNL4040_AMBIENT_INTEGRATION_TIME_80MS:
144-
data->sensitivity = 0.12;
144+
data->sensitivity = 0.1;
145145
break;
146146
case VCNL4040_AMBIENT_INTEGRATION_TIME_160MS:
147-
data->sensitivity = 0.06;
147+
data->sensitivity = 0.05;
148148
break;
149149
case VCNL4040_AMBIENT_INTEGRATION_TIME_320MS:
150-
data->sensitivity = 0.03;
150+
data->sensitivity = 0.025;
151151
break;
152152
case VCNL4040_AMBIENT_INTEGRATION_TIME_640MS:
153-
data->sensitivity = 0.015;
153+
data->sensitivity = 0.0125;
154154
break;
155155
default:
156156
data->sensitivity = 1.0;

0 commit comments

Comments
 (0)