summaryrefslogtreecommitdiff
path: root/drivers/iio/adc/da9150-gpadc.c
diff options
context:
space:
mode:
authorLukas Wunner <lukas@wunner.de>2017-08-22 15:33:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-12 11:51:19 +0200
commit1daa7c5aba21b63bb0a6135b0cb4213ef383658e (patch)
treee0a2ab8603f9be8eb62e3a84751a49ea29a40573 /drivers/iio/adc/da9150-gpadc.c
parent8b97d5b67e9ee4394d52a7b63086a4400d7dbf5a (diff)
iio: adc: mcp320x: Fix readout of negative voltages
commit e6f4794371ee7cce1339e7ca9542f1e703c5f84a upstream. Commit f686a36b4b79 ("iio: adc: mcp320x: Add support for mcp3301") returns a signed voltage from mcp320x_adc_conversion() but neglects that the caller interprets a negative return value as failure. Only mcp3301 (and the upcoming mcp3550/1/3) is affected as the other chips are incapable of measuring negative voltages. Fix and while at it, add mcp3301 to the list of supported chips at the top of the file. Fixes: f686a36b4b79 ("iio: adc: mcp320x: Add support for mcp3301") Cc: Andrea Galbusera <gizero@gmail.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio/adc/da9150-gpadc.c')
0 files changed, 0 insertions, 0 deletions