iio: light: rpr0521 proximity offset read/write
authorMikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Thu, 18 May 2017 12:12:55 +0000 (15:12 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 21 May 2017 14:06:15 +0000 (15:06 +0100)
commit734c442303ad886fb2471d0fae0845f4a8a958e1
tree8949cbd40ecbd293231e64adffb3a7bf9be145cf
parentc91a88ef846f65764ebe645324672fe54ec76204
iio: light: rpr0521 proximity offset read/write

Add sysfs read/write proximity offset feature. Offset is read/write from
sensor registers. Values are proximity raw 10-bit values. After applying
offset value, output values will be (measured_raw - offset_value). Output
values are unsigned so offset value doesn't make output negative.

Signed-off-by: Mikko Koivunen <mikko.koivunen@fi.rohmeurope.com>
Acked-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/light/rpr0521.c