iio: adc: ina2xx: Shift bus voltage register to mask flag bits
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sat, 28 Oct 2017 21:12:46 +0000 (23:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:51 +0000 (08:42 +0100)
commit975486d1f138c4c872265873cc2c868775ffd68c
tree5a25dd7482e1f591952ed0808a14b887aa2dfd50
parentcb334409bb0234827355450bf0edebc023916c10
iio: adc: ina2xx: Shift bus voltage register to mask flag bits

[ Upstream commit 2e64438487697f3f099946edc8acd4ceea6b1ab2 ]

Lower bits of the INA219/220 bus voltage register are conversion
status flags, properly shift the value.

When reading via IIO buffer, the value is passed on unaltered,
shifting is the responsibility of the user.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/ina2xx-adc.c