]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging:iio:meter:ade7758 unwind use of IIO_CHAN macro.
authorJonathan Cameron <jic23@kernel.org>
Fri, 13 Apr 2012 09:42:59 +0000 (10:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 18:08:04 +0000 (11:08 -0700)
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>
drivers/staging/iio/meter/ade7758_core.c

index 9374d6b264b02b2b556b23cd17292e0840ed42a8..4d6bffac3b2d9feee793d2443c39df203682b171 100644 (file)
@@ -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),
 };