]> git.proxmox.com Git - mirror_ubuntu-focal-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:25:51 +0000 (16:25 +0100)
commitbc57f2529e5d529376f0b34f9f3d2ed8e481bb13
treeeb161da5d0dca36f721022a1f4c6ed8d29b0a39b
parent7be74827f6f9f815323eaba73f48c26b552e4d0e
iio: light: vcnl4000: Fix scale for vcnl4040

BugLink: https://bugs.launchpad.net/bugs/1861090
commit bc80573ea25bb033a58da81b3ce27205b97c088e upstream.

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: 5a441aade5b3 ("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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/iio/light/vcnl4000.c