mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
iio: proximity: sx9500: Fix proximity value
Because of the ABI confusion proximity value exposed by SX9500 was inverted. Signed-off-by: Daniel Baluta <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
63fc444967
commit
86d24f04f9
1 changed files with 1 additions and 1 deletions
|
|
@ -281,7 +281,7 @@ static int sx9500_read_prox_data(struct sx9500_data *data,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
*val = 32767 - (s16)be16_to_cpu(regval);
|
||||
*val = be16_to_cpu(regval);
|
||||
|
||||
return IIO_VAL_INT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue