Skip to content

Commit c2f371e

Browse files
committed
iio:adc:ad7768: Fix the ad7768 scale factor
The scale factor had to be corrected from 488uV to 488nV, according to the following formula: (2*4.096)/(2^24) = 488.28125nV. Signed-off-by: Ioan-daniel Pop <Pop.Ioan-daniel@analog.com>
1 parent 8ab352e commit c2f371e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ad7768.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static int ad7768_read_raw(struct iio_dev *indio_dev,
477477
if (ret < 0)
478478
return ret;
479479

480-
*val = 2 * (ret / 1000);
480+
*val = 2 * (ret / 1000000);
481481
*val2 = chan->scan_type.realbits;
482482
return IIO_VAL_FRACTIONAL_LOG2;
483483
case IIO_CHAN_INFO_SAMP_FREQ:

0 commit comments

Comments
 (0)