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

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

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

Note the addition of extend_name = "supply" for the supply voltage
adc.  This brings this driver into line with the other adis parts.
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 4b788176
...@@ -408,41 +408,106 @@ static int adis16209_read_raw(struct iio_dev *indio_dev, ...@@ -408,41 +408,106 @@ static int adis16209_read_raw(struct iio_dev *indio_dev,
} }
static struct iio_chan_spec adis16209_channels[] = { static struct iio_chan_spec adis16209_channels[] = {
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, .type = IIO_VOLTAGE,
in_supply, ADIS16209_SCAN_SUPPLY, .indexed = 1,
IIO_ST('u', 14, 16, 0), 0), .channel = 0,
IIO_CHAN(IIO_TEMP, 0, 1, 0, NULL, 0, 0, .extend_name = "supply",
IIO_CHAN_INFO_SCALE_SEPARATE_BIT | .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, .address = in_supply,
temp, ADIS16209_SCAN_TEMP, .scan_index = ADIS16209_SCAN_SUPPLY,
IIO_ST('u', 12, 16, 0), 0), .scan_type = {
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_X, .sign = 'u',
IIO_CHAN_INFO_SCALE_SHARED_BIT | .realbits = 14,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, .storagebits = 16,
accel_x, ADIS16209_SCAN_ACC_X, },
IIO_ST('s', 14, 16, 0), 0), }, {
IIO_CHAN(IIO_ACCEL, 1, 0, 0, NULL, 0, IIO_MOD_Y, .type = IIO_TEMP,
IIO_CHAN_INFO_SCALE_SHARED_BIT | .indexed = 0,
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, .channel = 0,
accel_y, ADIS16209_SCAN_ACC_Y, .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT |
IIO_ST('s', 14, 16, 0), 0), IIO_CHAN_INFO_OFFSET_SEPARATE_BIT,
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, .address = temp,
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, .scan_index = ADIS16209_SCAN_TEMP,
in_aux, ADIS16209_SCAN_AUX_ADC, .scan_type = {
IIO_ST('u', 12, 16, 0), 0), .sign = 'u',
IIO_CHAN(IIO_INCLI, 1, 0, 0, NULL, 0, IIO_MOD_X, .realbits = 12,
IIO_CHAN_INFO_SCALE_SHARED_BIT, .storagebits = 16,
incli_x, ADIS16209_SCAN_INCLI_X, },
IIO_ST('s', 14, 16, 0), 0), }, {
IIO_CHAN(IIO_INCLI, 1, 0, 0, NULL, 0, IIO_MOD_Y, .type = IIO_ACCEL,
IIO_CHAN_INFO_SCALE_SHARED_BIT, .modified = 1,
incli_y, ADIS16209_SCAN_INCLI_Y, .channel2 = IIO_MOD_X,
IIO_ST('s', 14, 16, 0), 0), .info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT |
IIO_CHAN(IIO_ROT, 0, 1, 0, NULL, 0, IIO_MOD_X, IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT,
0, .address = accel_x,
rot, ADIS16209_SCAN_ROT, .scan_index = ADIS16209_SCAN_ACC_X,
IIO_ST('s', 14, 16, 0), 0), .scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
}, {
.type = IIO_ACCEL,
.modified = 1,
.channel2 = IIO_MOD_Y,
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT |
IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT,
.address = accel_y,
.scan_index = ADIS16209_SCAN_ACC_Y,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
}, {
.type = IIO_VOLTAGE,
.indexed = 1,
.channel = 1,
.info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
.address = in_aux,
.scan_index = ADIS16209_SCAN_AUX_ADC,
.scan_type = {
.sign = 'u',
.realbits = 12,
.storagebits = 16,
},
}, {
.type = IIO_INCLI,
.modified = 1,
.channel2 = IIO_MOD_X,
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = incli_x,
.scan_index = ADIS16209_SCAN_INCLI_X,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
}, {
.type = IIO_INCLI,
.modified = 1,
.channel2 = IIO_MOD_Y,
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = incli_y,
.scan_index = ADIS16209_SCAN_INCLI_Y,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
}, {
.type = IIO_ROT,
.modified = 1,
.channel2 = IIO_MOD_X,
.address = rot,
.scan_index = ADIS16209_SCAN_ROT,
.scan_type = {
.sign = 's',
.realbits = 14,
.storagebits = 16,
},
},
IIO_CHAN_SOFT_TIMESTAMP(8) IIO_CHAN_SOFT_TIMESTAMP(8)
}; };
......
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