iio: light: vcnl4000: Add oversampling_ratio for 4040/4200
authorAstrid Rost <astrid.rost@axis.com>
Tue, 13 Jun 2023 13:50:23 +0000 (15:50 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 20 Jul 2023 18:21:29 +0000 (19:21 +0100)
commitadd9846676600b35e1bbb6bbc2703746687ae4ec
treef0370b5350b4755ff319d49cfdfb02bf0ee294c8
parent7f8651270c6c9c662281232dde9d1ca5a983730f
iio: light: vcnl4000: Add oversampling_ratio for 4040/4200

Add the proximity multi pulse (PS_MPS) as oversampling_ratio.
Instead of one single pulse per every defined time frame, one can
program2, 4, or even 8 pulses. This leads to a longer IRED on-time
for each proximity measurement value, which also results in a higher
detection range.

Add read/write attribute for proximity oversampling-ratio and read
attribute for available oversampling-ratio.
This is supported for vcnl4040 and vcnl4200.

Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20230613135025.2596641-8-astrid.rost@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c