Commit a684a0c7 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

staging:iio:ad7192: Mark channels as unsigned

The values reported by the AD7793 are unsigned.
	In uniploar mode:
			0x000000 is zeroscale
			0xffffff is fullscale
	In bipolar mode:
			0x000000 is negative fullscale
			0x800000 is zeroscale
			0xffffff is positive fullscale

In bipolar mode there is a binary offset, but the values are still unsigned.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 74aa9338
...@@ -945,7 +945,7 @@ static const struct iio_info ad7195_info = { ...@@ -945,7 +945,7 @@ static const struct iio_info ad7195_info = {
IIO_CHAN_INFO_SCALE_SHARED_BIT, \ IIO_CHAN_INFO_SCALE_SHARED_BIT, \
.address = _address, \ .address = _address, \
.scan_index = _si, \ .scan_index = _si, \
.scan_type = IIO_ST('s', 24, 32, 0)} .scan_type = IIO_ST('u', 24, 32, 0)}
#define AD7192_CHAN(_chan, _address, _si) \ #define AD7192_CHAN(_chan, _address, _si) \
{ .type = IIO_VOLTAGE, \ { .type = IIO_VOLTAGE, \
...@@ -955,7 +955,7 @@ static const struct iio_info ad7195_info = { ...@@ -955,7 +955,7 @@ static const struct iio_info ad7195_info = {
IIO_CHAN_INFO_SCALE_SHARED_BIT, \ IIO_CHAN_INFO_SCALE_SHARED_BIT, \
.address = _address, \ .address = _address, \
.scan_index = _si, \ .scan_index = _si, \
.scan_type = IIO_ST('s', 24, 32, 0)} .scan_type = IIO_ST('u', 24, 32, 0)}
#define AD7192_CHAN_TEMP(_chan, _address, _si) \ #define AD7192_CHAN_TEMP(_chan, _address, _si) \
{ .type = IIO_TEMP, \ { .type = IIO_TEMP, \
...@@ -965,7 +965,7 @@ static const struct iio_info ad7195_info = { ...@@ -965,7 +965,7 @@ static const struct iio_info ad7195_info = {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \
.address = _address, \ .address = _address, \
.scan_index = _si, \ .scan_index = _si, \
.scan_type = IIO_ST('s', 24, 32, 0)} .scan_type = IIO_ST('u', 24, 32, 0)}
static struct iio_chan_spec ad7192_channels[] = { static struct iio_chan_spec ad7192_channels[] = {
AD7192_CHAN_DIFF(1, 2, NULL, AD7192_CH_AIN1P_AIN2M, 0), AD7192_CHAN_DIFF(1, 2, NULL, AD7192_CH_AIN1P_AIN2M, 0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment