Skip to content
Commit 96f699ad authored by Michele Jr De Candia's avatar Michele Jr De Candia Committed by Jean Delvare
Browse files

i2c/tsl2550: Fix lux value in dark environment



I've tested TSL2550 driver and I've found a bug: when light is off, 
returned value from tsl2550_calculate_lux function is -1 when it should 
be 0 (sensor correctly read that light was off).

I think the bug is that a zero c0 value (approximated value of ch0) is 
misinterpreted as an error. 

Signed-off-by: default avatarMichele Jr De Candia <michele.decandia@valueteam.com>
Acked-by: default avatarRodolfo Giometti <giometti@linux.it>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 4733fd32
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment