aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/impedance-analyzer
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-04-13 10:42:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-13 11:08:04 -0700
commitcdacc05bfa479997424fa9a3b54c07573b0ce4ed (patch)
treeebca3ade5cf7b3795c2efd9c1fd6a26a41ef3630 /drivers/staging/iio/impedance-analyzer
parentstaging:iio:gyro:adis16260 unwind use of IIO_CHAN macro. (diff)
downloadlinux-dev-cdacc05bfa479997424fa9a3b54c07573b0ce4ed.tar.xz
linux-dev-cdacc05bfa479997424fa9a3b54c07573b0ce4ed.zip
staging:iio:impedance-analyzer:ad5933 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>
Diffstat (limited to 'drivers/staging/iio/impedance-analyzer')
-rw-r--r--drivers/staging/iio/impedance-analyzer/ad5933.c47
1 files changed, 38 insertions, 9 deletions
diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index cd82b56d58af..06b9fe29a817 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -109,15 +109,44 @@ static struct ad5933_platform_data ad5933_default_pdata = {
};
static struct iio_chan_spec ad5933_channels[] = {
- IIO_CHAN(IIO_TEMP, 0, 1, 1, NULL, 0, 0, 0,
- 0, AD5933_REG_TEMP_DATA, IIO_ST('s', 14, 16, 0), 0),
- /* Ring Channels */
- IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "real_raw", 0, 0,
- IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
- AD5933_REG_REAL_DATA, 0, IIO_ST('s', 16, 16, 0), 0),
- IIO_CHAN(IIO_VOLTAGE, 0, 1, 0, "imag_raw", 0, 0,
- IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
- AD5933_REG_IMAG_DATA, 1, IIO_ST('s', 16, 16, 0), 0),
+ {
+ .type = IIO_TEMP,
+ .indexed = 1,
+ .processed_val = 1,
+ .channel = 0,
+ .address = AD5933_REG_TEMP_DATA,
+ .scan_type = {
+ .sign = 's',
+ .realbits = 14,
+ .storagebits = 16,
+ },
+ }, { /* Ring Channels */
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "real_raw",
+ .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
+ .address = AD5933_REG_REAL_DATA,
+ .scan_index = 0,
+ .scan_type = {
+ .sign = 's',
+ .realbits = 16,
+ .storagebits = 16,
+ },
+ }, {
+ .type = IIO_VOLTAGE,
+ .indexed = 1,
+ .channel = 0,
+ .extend_name = "imag_raw",
+ .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT,
+ .address = AD5933_REG_IMAG_DATA,
+ .scan_index = 1,
+ .scan_type = {
+ .sign = 's',
+ .realbits = 16,
+ .storagebits = 16,
+ },
+ },
};
static int ad5933_i2c_write(struct i2c_client *client,