Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: light: bu27008: Fix intensity data type

The intensity data from bu27008 is unsigned. The type of the scan data
was incorrectly marked as signed resulting large intensity values to be
interpreted as negative ones.

Fix the scan data type.

Fixes: 41ff93d14f78 ("iio: light: ROHM BU27008 color sensor")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/240a7ca5fc1b76da20d81f930d00f31a54b1fdf8.1686648422.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Matti Vaittinen and committed by
Jonathan Cameron
95fb1e7b 096649cd

+1 -1
+1 -1
drivers/iio/light/rohm-bu27008.c
··· 190 190 .address = BU27008_REG_##data##_LO, \ 191 191 .scan_index = BU27008_##color, \ 192 192 .scan_type = { \ 193 - .sign = 's', \ 193 + .sign = 'u', \ 194 194 .realbits = 16, \ 195 195 .storagebits = 16, \ 196 196 .endianness = IIO_LE, \