Skip to content

Commit e7e51eb

Browse files
nunojsajic23
authored andcommitted
iio: dac: ltc2688: fix voltage scale read
Properly set *val2 (and not overwrite *val) to correctly return IIO_VAL_FRACTIONAL_LOG2. Fixes: 832cb9e ("iio: dac: add support for ltc2688") Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20220412124916.61-1-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent de3b9fe commit e7e51eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/dac/ltc2688.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ static int ltc2688_read_raw(struct iio_dev *indio_dev,
298298
if (ret)
299299
return ret;
300300

301-
*val = 16;
301+
*val2 = 16;
302302
return IIO_VAL_FRACTIONAL_LOG2;
303303
case IIO_CHAN_INFO_CALIBBIAS:
304304
ret = regmap_read(st->regmap,

0 commit comments

Comments
 (0)