iio: light: vcnl4000: update sampling periods for vcnl4200
authorTomas Novotny <tomas@novotny.cz>
Tue, 18 Feb 2020 15:44:50 +0000 (16:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 07:25:54 +0000 (08:25 +0100)
commitc3540b094edb83f97393a0bca367fee075318163
treeca0be4ecf9c2eafb2905624073ba96cd1570b875
parent7ad22950caf536c320a10d16cedb71902bbbda15
iio: light: vcnl4000: update sampling periods for vcnl4200

commit b42aa97ed5f1169cfd37175ef388ea62ff2dcf43 upstream.

Vishay has published a new version of "Designing the VCNL4200 Into an
Application" application note in October 2019. The new version specifies
that there is +-20% of part to part tolerance. This explains the drift
seen during experiments. The proximity pulse width is also changed from
32us to 30us. According to the support, the tolerance also applies to
ambient light.

So update the sampling periods. As the reading is blocking, current
users may notice slightly longer response time.

Fixes: be38866fbb97 ("iio: vcnl4000: add support for VCNL4200")
Reviewed-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Tomas Novotny <tomas@novotny.cz>
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