We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecd5b50 commit 8236644Copy full SHA for 8236644
drivers/iio/adc/ad7768-1.c
@@ -142,7 +142,7 @@ static const struct iio_chan_spec ad7768_channels[] = {
142
.channel = 0,
143
.scan_index = 0,
144
.scan_type = {
145
- .sign = 'u',
+ .sign = 's',
146
.realbits = 24,
147
.storagebits = 32,
148
.shift = 8,
@@ -373,7 +373,7 @@ static int ad7768_read_raw(struct iio_dev *indio_dev,
373
iio_device_release_direct(indio_dev);
374
if (ret < 0)
375
return ret;
376
- *val = ret;
+ *val = sign_extend32(ret, chan->scan_type.realbits - 1);
377
378
return IIO_VAL_INT;
379
0 commit comments