diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2012-08-10 12:36:00 -0400 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2012-08-16 15:24:36 -0400 |
| commit | a684a0c711d384665b43f9079a035e52a2761eab (patch) | |
| tree | cb315410e43a48f94b71ebc0d85e6ad0bec388a5 | |
| parent | 74aa933894e1c32376a8372ec8264b8c6f7faf24 (diff) | |
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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
| -rw-r--r-- | drivers/staging/iio/adc/ad7192.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 0a1bc6a31d02..7ba699486326 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c | |||
| @@ -945,7 +945,7 @@ static const struct iio_info ad7195_info = { | |||
| 945 | IIO_CHAN_INFO_SCALE_SHARED_BIT, \ | 945 | IIO_CHAN_INFO_SCALE_SHARED_BIT, \ |
| 946 | .address = _address, \ | 946 | .address = _address, \ |
| 947 | .scan_index = _si, \ | 947 | .scan_index = _si, \ |
| 948 | .scan_type = IIO_ST('s', 24, 32, 0)} | 948 | .scan_type = IIO_ST('u', 24, 32, 0)} |
| 949 | 949 | ||
| 950 | #define AD7192_CHAN(_chan, _address, _si) \ | 950 | #define AD7192_CHAN(_chan, _address, _si) \ |
| 951 | { .type = IIO_VOLTAGE, \ | 951 | { .type = IIO_VOLTAGE, \ |
| @@ -955,7 +955,7 @@ static const struct iio_info ad7195_info = { | |||
| 955 | IIO_CHAN_INFO_SCALE_SHARED_BIT, \ | 955 | IIO_CHAN_INFO_SCALE_SHARED_BIT, \ |
| 956 | .address = _address, \ | 956 | .address = _address, \ |
| 957 | .scan_index = _si, \ | 957 | .scan_index = _si, \ |
| 958 | .scan_type = IIO_ST('s', 24, 32, 0)} | 958 | .scan_type = IIO_ST('u', 24, 32, 0)} |
| 959 | 959 | ||
| 960 | #define AD7192_CHAN_TEMP(_chan, _address, _si) \ | 960 | #define AD7192_CHAN_TEMP(_chan, _address, _si) \ |
| 961 | { .type = IIO_TEMP, \ | 961 | { .type = IIO_TEMP, \ |
| @@ -965,7 +965,7 @@ static const struct iio_info ad7195_info = { | |||
| 965 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ | 965 | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ |
| 966 | .address = _address, \ | 966 | .address = _address, \ |
| 967 | .scan_index = _si, \ | 967 | .scan_index = _si, \ |
| 968 | .scan_type = IIO_ST('s', 24, 32, 0)} | 968 | .scan_type = IIO_ST('u', 24, 32, 0)} |
| 969 | 969 | ||
| 970 | static struct iio_chan_spec ad7192_channels[] = { | 970 | static struct iio_chan_spec ad7192_channels[] = { |
| 971 | AD7192_CHAN_DIFF(1, 2, NULL, AD7192_CH_AIN1P_AIN2M, 0), | 971 | AD7192_CHAN_DIFF(1, 2, NULL, AD7192_CH_AIN1P_AIN2M, 0), |
