]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: vcnl4000: Fix scale for vcnl4040
authorGuido Günther <agx@sigxcpu.org>
Fri, 27 Dec 2019 10:22:54 +0000 (11:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jan 2020 11:08:40 +0000 (12:08 +0100)
commite80a2b3cb96036402c32b4ac4feb1c393bf644c9
treeed9e9c1d138701706206f5a3a26d2fd2a15c290c
parent0f249edc8f6ec07a5cc8651ab1107a1cfa614097
iio: light: vcnl4000: Fix scale for vcnl4040

According to the data sheet the ambient sensor's scale is 0.12 lux/step
(not 0.024 lux/step as used by vcnl4200) when the integration time is
80ms. The integration time is currently hardcoded in the driver to that
value.

See p. 8 in https://www.vishay.com/docs/84307/designingvcnl4040.pdf

Fixes: ccf529a29963 ("iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/light/vcnl4000.c