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

iio: proximity: sx9500: Fix proximity value

Because of the ABI confusion proximity value exposed by SX9500
was inverted.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Daniel Baluta and committed by
Jonathan Cameron
86d24f04 63fc4449

+1 -1
+1 -1
drivers/iio/proximity/sx9500.c
··· 281 281 if (ret < 0) 282 282 return ret; 283 283 284 - *val = 32767 - (s16)be16_to_cpu(regval); 284 + *val = be16_to_cpu(regval); 285 285 286 286 return IIO_VAL_INT; 287 287 }