提交 86d24f04 编写于 作者: D Daniel Baluta 提交者: Jonathan Cameron

iio: proximity: sx9500: Fix proximity value

Because of the ABI confusion proximity value exposed by SX9500
was inverted.
Signed-off-by: NDaniel Baluta <daniel.baluta@intel.com>
Reviewed-by: NVlad Dogaru <vlad.dogaru@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册