iio: adc: mcp3911: make use of the sign bit
authorMarcus Folkesson <marcus.folkesson@gmail.com>
Fri, 22 Jul 2022 13:07:18 +0000 (15:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Sep 2022 10:28:01 +0000 (12:28 +0200)
commit7497f9766f08a05e7c5c939dd9542a01702df458
tree5d45dbd3122925a6a970f594d63011eda633a2f6
parent9e1f74294d539849917563555b783411be9ac84a
iio: adc: mcp3911: make use of the sign bit

[ Upstream commit 8f89e33bf040bbef66386c426198622180233178 ]

The device supports negative values as well.

Fixes: 3a89b289df5d ("iio: adc: add support for mcp3911")
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220722130726.7627-2-marcus.folkesson@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/mcp3911.c