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

staging:iio:adc:ad7298 unwind use of IIO_CHAN macro.

This macro is being removed to simplify ongoing maintenance
so we need to unwind and remaining users.
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 691a4ca1
...@@ -22,34 +22,43 @@ ...@@ -22,34 +22,43 @@
#include "ad7298.h" #include "ad7298.h"
#define AD7298_V_CHAN(index) \
{ \
.type = IIO_VOLTAGE, \
.indexed = 1, \
.channel = index, \
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT, \
.address = index, \
.scan_index = index, \
.scan_type = { \
.sign = 'u', \
.realbits = 12, \
.storagebits = 16, \
}, \
}
static struct iio_chan_spec ad7298_channels[] = { static struct iio_chan_spec ad7298_channels[] = {
IIO_CHAN(IIO_TEMP, 0, 1, 0, NULL, 0, 0, {
IIO_CHAN_INFO_SCALE_SEPARATE_BIT, .type = IIO_TEMP,
9, AD7298_CH_TEMP, IIO_ST('s', 32, 32, 0), 0), .indexed = 1,
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 0, 0, .channel = 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT, .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
0, 0, IIO_ST('u', 12, 16, 0), 0), .address = 9,
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 1, 0, .scan_index = AD7298_CH_TEMP,
IIO_CHAN_INFO_SCALE_SHARED_BIT, .scan_type = {
1, 1, IIO_ST('u', 12, 16, 0), 0), .sign = 's',
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 2, 0, .realbits = 32,
IIO_CHAN_INFO_SCALE_SHARED_BIT, .storagebits = 32,
2, 2, IIO_ST('u', 12, 16, 0), 0), },
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 3, 0, },
IIO_CHAN_INFO_SCALE_SHARED_BIT, AD7298_V_CHAN(0),
3, 3, IIO_ST('u', 12, 16, 0), 0), AD7298_V_CHAN(1),
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 4, 0, AD7298_V_CHAN(2),
IIO_CHAN_INFO_SCALE_SHARED_BIT, AD7298_V_CHAN(3),
4, 4, IIO_ST('u', 12, 16, 0), 0), AD7298_V_CHAN(4),
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 5, 0, AD7298_V_CHAN(5),
IIO_CHAN_INFO_SCALE_SHARED_BIT, AD7298_V_CHAN(6),
5, 5, IIO_ST('u', 12, 16, 0), 0), AD7298_V_CHAN(7),
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 6, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
6, 6, IIO_ST('u', 12, 16, 0), 0),
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, NULL, 7, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
7, 7, IIO_ST('u', 12, 16, 0), 0),
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