Commit 4b788176 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:accel:adis16204 unwind use of IIO_CHAN macro.

This macro is being removed to simplify ongoing maintenance
so we need to unwind and remaining users.

Note that previously the supply was not indexed. I have made
it indexed for consistency with other similar devices and
for internal consistency with the aux adc port.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 554ae981
...@@ -444,31 +444,73 @@ static int adis16204_write_raw(struct iio_dev *indio_dev, ...@@ -444,31 +444,73 @@ static int adis16204_write_raw(struct iio_dev *indio_dev,
} }
static struct iio_chan_spec adis16204_channels[] = { static struct iio_chan_spec adis16204_channels[] = {
IIO_CHAN(IIO_VOLTAGE, 0, 0, 0, "supply", 0, 0, {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, .type = IIO_VOLTAGE,
in_supply, ADIS16204_SCAN_SUPPLY, .indexed = 1, /* Note was not previously indexed */
IIO_ST('u', 12, 16, 0), 0), .channel = 0,
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, .extend_name = "supply",
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
in_aux, ADIS16204_SCAN_AUX_ADC, .address = in_supply,
IIO_ST('u', 12, 16, 0), 0), .scan_index = ADIS16204_SCAN_SUPPLY,
IIO_CHAN(IIO_TEMP, 0, 1, 0, NULL, 0, 0, .scan_type = {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT | .sign = 'u',
IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, .realbits = 12,
temp, ADIS16204_SCAN_TEMP, .storagebits = 16,
IIO_ST('u', 12, 16, 0), 0), },
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_X, }, {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT | .type = IIO_VOLTAGE,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | .indexed = 1,
IIO_CHAN_INFO_PEAK_SEPARATE_BIT, .channel = 1,
accel_x, ADIS16204_SCAN_ACC_X, .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
IIO_ST('s', 14, 16, 0), 0), .address = in_aux,
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_Y, .scan_index = ADIS16204_SCAN_AUX_ADC,
IIO_CHAN_INFO_SCALE_SEPARATE_BIT | .scan_type = {
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | .sign = 'u',
IIO_CHAN_INFO_PEAK_SEPARATE_BIT, .realbits = 12,
accel_y, ADIS16204_SCAN_ACC_Y, .storagebits = 16,
IIO_ST('s', 14, 16, 0), 0), },
}, {
.type = IIO_TEMP,
.indexed = 1,
.channel = 0,
.info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT |
IIO_CHAN_INFO_OFFSET_SEPARATE_BIT,
.address = temp,
.scan_index = ADIS16204_SCAN_TEMP,
.scan_type = {
.sign = 'u',
.realbits = 12,
.storagebits = 16,
},
}, {
.type = IIO_ACCEL,
.modified = 1,
.channel2 = IIO_MOD_X,
.info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT |
IIO_CHAN_INFO_PEAK_SEPARATE_BIT,
.address = accel_x,
.scan_index = ADIS16204_SCAN_ACC_X,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
}, {
.type = IIO_ACCEL,
.modified = 1,
.channel2 = IIO_MOD_Y,
.info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT |
IIO_CHAN_INFO_PEAK_SEPARATE_BIT,
.address = accel_y,
.scan_index = ADIS16204_SCAN_ACC_Y,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
},
IIO_CHAN_SOFT_TIMESTAMP(5), IIO_CHAN_SOFT_TIMESTAMP(5),
}; };
......
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