iio: light: vcnl4000: Set ps high definition for 4040/4200
authorMårten Lindahl <marten.lindahl@axis.com>
Mon, 15 Jan 2024 11:44:36 +0000 (12:44 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:16:09 +0000 (16:16 +0000)
commit44b90383453c6664b119ec985e70f87c90e050f1
treee823351084d03603c7fcdd48da66424feb585619
parent1ca53b5df113bd008f5fd7ecdf108872f1cf7508
iio: light: vcnl4000: Set ps high definition for 4040/4200

The vcnl4040/vcnl4200 proximity sensor defaults to 12 bit data
resolution, but the chip also supports 16 bit data resolution, which is
called proximity high definition (PS_HD).

Make the vcnl4040/vcnl4200 proximity sensor use the high definition for
all data readings. Please note that in order to preserve the 12 bit
integer part of the in_proximity_raw output, the format is changed from
integer to fixed point.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Link: https://lore.kernel.org/r/20231221-vcnl4000-ps-hd-v3-1-6dcc889372be@axis.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c