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

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: 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 cdacc05b
......@@ -662,66 +662,202 @@ static const struct attribute_group ade7758_attribute_group = {
};
static struct iio_chan_spec ade7758_channels[] = {
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 0, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
0, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 0, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
1, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 0, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
2, IIO_ST('s', 24, 32, 0), 0),
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),
3, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 0, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
4, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "raw", 1, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE),
5, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 1, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT),
6, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 1, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR),
7, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "active_raw", 1, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR),
8, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 1, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
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,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE),
10, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_CURRENT, 0, 1, 0, "raw", 2, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT),
11, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "apparent_raw", 2, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR),
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,
AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR),
13, IIO_ST('s', 24, 32, 0), 0),
IIO_CHAN(IIO_POWER, 0, 1, 0, "reactive_raw", 2, 0,
IIO_CHAN_INFO_SCALE_SHARED_BIT,
AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR),
14, IIO_ST('s', 24, 32, 0), 0),
{
.type = IIO_VOLTAGE,
.indexed = 1,
.channel = 0,
.extend_name = "raw",
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE),
.scan_index = 0,
.scan_type = {
.sign = 's',
.realbits = 24,
.storagebits = 32,
},
}, {
.type = IIO_CURRENT,
.indexed = 1,
.channel = 0,
.extend_name = "raw",
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT),
.scan_index = 1,
.scan_type = {
.sign = 's',
.realbits = 24,
.storagebits = 32,
},
}, {
.type = IIO_POWER,
.indexed = 1,
.channel = 0,
.extend_name = "apparent_raw",
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR),
.scan_index = 2,
.scan_type = {
.sign = 's',
.realbits = 24,
.storagebits = 32,
},
}, {
.type = IIO_POWER,
.indexed = 1,
.channel = 0,
.extend_name = "active_raw",
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR),
.scan_index = 3,
.scan_type = {
.sign = 's',
.realbits = 24,
.storagebits = 32,
},
}, {
.type = IIO_POWER,
.indexed = 1,
.channel = 0,
.extend_name = "reactive_raw",
.info_mask = IIO_CHAN_INFO_SCALE_SHARED_BIT,
.address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR),
.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),
};
......
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