staging:iio:meter:ade7758 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: Jonathan Cameron <jic23@kernel.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
cdacc05bfa
Коммит
926c045222
|
@ -662,66 +662,202 @@ static const struct attribute_group ade7758_attribute_group = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct iio_chan_spec ade7758_channels[] = {
|
static struct iio_chan_spec ade7758_channels[] = {
|
||||||
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 0, 0,
|
{
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.type = IIO_VOLTAGE,
|
||||||
AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
|
.indexed = 1,
|
||||||
0, IIO_ST('s', 24, 32, 0), 0),
|
.channel = 0,
|
||||||
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 0, 0,
|
.extend_name = "raw",
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
|
.address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
|
||||||
1, IIO_ST('s', 24, 32, 0), 0),
|
.scan_index = 0,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 0, 0,
|
.scan_type = {
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.sign = 's',
|
||||||
AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
|
.realbits = 24,
|
||||||
2, IIO_ST('s', 24, 32, 0), 0),
|
.storagebits = 32,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 0, 0,
|
},
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
}, {
|
||||||
AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR),
|
.type = IIO_CURRENT,
|
||||||
3, IIO_ST('s', 24, 32, 0), 0),
|
.indexed = 1,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 0, 0,
|
.channel = 0,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.extend_name = "raw",
|
||||||
AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
4, IIO_ST('s', 24, 32, 0), 0),
|
.address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
|
||||||
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 1, 0,
|
.scan_index = 1,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.scan_type = {
|
||||||
AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE),
|
.sign = 's',
|
||||||
5, IIO_ST('s', 24, 32, 0), 0),
|
.realbits = 24,
|
||||||
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 1, 0,
|
.storagebits = 32,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
},
|
||||||
AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT),
|
}, {
|
||||||
6, IIO_ST('s', 24, 32, 0), 0),
|
.type = IIO_POWER,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 1, 0,
|
.indexed = 1,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.channel = 0,
|
||||||
AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR),
|
.extend_name = "apparent_raw",
|
||||||
7, IIO_ST('s', 24, 32, 0), 0),
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 1, 0,
|
.address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.scan_index = 2,
|
||||||
AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR),
|
.scan_type = {
|
||||||
8, IIO_ST('s', 24, 32, 0), 0),
|
.sign = 's',
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 1, 0,
|
.realbits = 24,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.storagebits = 32,
|
||||||
AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR),
|
},
|
||||||
9, IIO_ST('s', 24, 32, 0), 0),
|
}, {
|
||||||
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 2, 0,
|
.type = IIO_POWER,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.indexed = 1,
|
||||||
AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE),
|
.channel = 0,
|
||||||
10, IIO_ST('s', 24, 32, 0), 0),
|
.extend_name = "active_raw",
|
||||||
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 2, 0,
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR),
|
||||||
AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT),
|
.scan_index = 3,
|
||||||
11, IIO_ST('s', 24, 32, 0), 0),
|
.scan_type = {
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 2, 0,
|
.sign = 's',
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.realbits = 24,
|
||||||
AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR),
|
.storagebits = 32,
|
||||||
12, IIO_ST('s', 24, 32, 0), 0),
|
},
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 2, 0,
|
}, {
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.type = IIO_POWER,
|
||||||
AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR),
|
.indexed = 1,
|
||||||
13, IIO_ST('s', 24, 32, 0), 0),
|
.channel = 0,
|
||||||
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 2, 0,
|
.extend_name = "reactive_raw",
|
||||||
IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR),
|
.address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
|
||||||
14, IIO_ST('s', 24, 32, 0), 0),
|
.scan_index = 4,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_VOLTAGE,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 1,
|
||||||
|
.extend_name = "raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE),
|
||||||
|
.scan_index = 5,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_CURRENT,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 1,
|
||||||
|
.extend_name = "raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT),
|
||||||
|
.scan_index = 6,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 1,
|
||||||
|
.extend_name = "apparent_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR),
|
||||||
|
.scan_index = 7,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 1,
|
||||||
|
.extend_name = "active_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR),
|
||||||
|
.scan_index = 8,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 1,
|
||||||
|
.extend_name = "reactive_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR),
|
||||||
|
.scan_index = 9,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_VOLTAGE,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 2,
|
||||||
|
.extend_name = "raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE),
|
||||||
|
.scan_index = 10,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_CURRENT,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 2,
|
||||||
|
.extend_name = "raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT),
|
||||||
|
.scan_index = 11,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 2,
|
||||||
|
.extend_name = "apparent_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR),
|
||||||
|
.scan_index = 12,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 2,
|
||||||
|
.extend_name = "active_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR),
|
||||||
|
.scan_index = 13,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
.type = IIO_POWER,
|
||||||
|
.indexed = 1,
|
||||||
|
.channel = 2,
|
||||||
|
.extend_name = "reactive_raw",
|
||||||
|
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
|
||||||
|
.address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR),
|
||||||
|
.scan_index = 14,
|
||||||
|
.scan_type = {
|
||||||
|
.sign = 's',
|
||||||
|
.realbits = 24,
|
||||||
|
.storagebits = 32,
|
||||||
|
},
|
||||||
|
},
|
||||||
IIO_CHAN_SOFT_TIMESTAMP(15),
|
IIO_CHAN_SOFT_TIMESTAMP(15),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче