Commit 86d24f04 authored by Daniel Baluta's avatar Daniel Baluta Committed by Jonathan Cameron

iio: proximity: sx9500: Fix proximity value

Because of the ABI confusion proximity value exposed by SX9500
was inverted.
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@intel.com>
Reviewed-by: default avatarVlad Dogaru <vlad.dogaru@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 63fc4449
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment