Skip to content

Commit 4f54340

Browse files
linuswjic23
authored andcommitted
iio: adc: ab8500-gpadc: Fix off by 10 to 3
Fix an off by three orders of magnitude error in the AB8500 GPADC driver. Luckily it showed up quite quickly when trying to make use of it. The processed reads were returning microvolts, microamperes and microcelsius instead of millivolts, milliamperes and millicelsius as advertised. Cc: [email protected] Fixes: 07063bb ("iio: adc: New driver for the AB8500 GPADC") Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 121875b commit 4f54340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ab8500-gpadc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@ static int ab8500_gpadc_read_raw(struct iio_dev *indio_dev,
918918
return processed;
919919

920920
/* Return millivolt or milliamps or millicentigrades */
921-
*val = processed * 1000;
921+
*val = processed;
922922
return IIO_VAL_INT;
923923
}
924924

0 commit comments

Comments
 (0)