forked from Minki/linux
staging:iio:ad7780: Mark channels as unsigned
The values reported by the AD7780 are unsigned with a binary offset: 0x000000 is negative fullscale 0x800000 is zeroscale 0xffffff is positive fullscale So mark the channel in the channel spec as unsigned rather than signed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
4fcbcf95b7
commit
70e01880a9
|
@ -131,9 +131,10 @@ static const struct ad7780_chip_info ad7780_chip_info_tbl[] = {
|
||||||
.indexed = 1,
|
.indexed = 1,
|
||||||
.channel = 0,
|
.channel = 0,
|
||||||
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
|
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
IIO_CHAN_INFO_SCALE_SHARED_BIT |
|
||||||
|
IIO_CHAN_INFO_OFFSET_SHARED_BIT,
|
||||||
.scan_type = {
|
.scan_type = {
|
||||||
.sign = 's',
|
.sign = 'u',
|
||||||
.realbits = 24,
|
.realbits = 24,
|
||||||
.storagebits = 32,
|
.storagebits = 32,
|
||||||
.shift = 8,
|
.shift = 8,
|
||||||
|
@ -146,9 +147,10 @@ static const struct ad7780_chip_info ad7780_chip_info_tbl[] = {
|
||||||
.indexed = 1,
|
.indexed = 1,
|
||||||
.channel = 0,
|
.channel = 0,
|
||||||
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
|
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
IIO_CHAN_INFO_SCALE_SHARED_BIT |
|
||||||
|
IIO_CHAN_INFO_OFFSET_SHARED_BIT,
|
||||||
.scan_type = {
|
.scan_type = {
|
||||||
.sign = 's',
|
.sign = 'u',
|
||||||
.realbits = 20,
|
.realbits = 20,
|
||||||
.storagebits = 32,
|
.storagebits = 32,
|
||||||
.shift = 12,
|
.shift = 12,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user