iio:imu:adis16480 move to info_mask_(shared_by_type/separate)
authorJonathan Cameron <jic23@kernel.org>
Wed, 27 Feb 2013 19:31:52 +0000 (19:31 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 17 Mar 2013 19:49:36 +0000 (19:49 +0000)
The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
drivers/iio/imu/adis16480.c

index 8c26a5f7cd5d1deaae1b6857cb43330ef0d8b5ed..b7db3837629549cdf1a928faa337b11f89b1bc26 100644 (file)
@@ -591,15 +591,15 @@ static int adis16480_write_raw(struct iio_dev *indio_dev,
        }
 }
 
-#define ADIS16480_MOD_CHANNEL(_type, _mod, _address, _si, _info, _bits) \
+#define ADIS16480_MOD_CHANNEL(_type, _mod, _address, _si, _info_sep, _bits) \
        { \
                .type = (_type), \
                .modified = 1, \
                .channel2 = (_mod), \
-               .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_SCALE_SHARED_BIT | \
-                       _info, \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
+                       BIT(IIO_CHAN_INFO_CALIBBIAS) | \
+                       _info_sep, \
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \
                .address = (_address), \
                .scan_index = (_si), \
                .scan_type = { \
@@ -613,21 +613,21 @@ static int adis16480_write_raw(struct iio_dev *indio_dev,
 #define ADIS16480_GYRO_CHANNEL(_mod) \
        ADIS16480_MOD_CHANNEL(IIO_ANGL_VEL, IIO_MOD_ ## _mod, \
        ADIS16480_REG_ ## _mod ## _GYRO_OUT, ADIS16480_SCAN_GYRO_ ## _mod, \
-       IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT | \
-       IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, \
+       BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | \
+       BIT(IIO_CHAN_INFO_CALIBSCALE), \
        32)
 
 #define ADIS16480_ACCEL_CHANNEL(_mod) \
        ADIS16480_MOD_CHANNEL(IIO_ACCEL, IIO_MOD_ ## _mod, \
        ADIS16480_REG_ ## _mod ## _ACCEL_OUT, ADIS16480_SCAN_ACCEL_ ## _mod, \
-       IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT | \
-       IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, \
+       BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY) | \
+       BIT(IIO_CHAN_INFO_CALIBSCALE), \
        32)
 
 #define ADIS16480_MAGN_CHANNEL(_mod) \
        ADIS16480_MOD_CHANNEL(IIO_MAGN, IIO_MOD_ ## _mod, \
        ADIS16480_REG_ ## _mod ## _MAGN_OUT, ADIS16480_SCAN_MAGN_ ## _mod, \
-       IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT, \
+       BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \
        16)
 
 #define ADIS16480_PRESSURE_CHANNEL() \
@@ -635,9 +635,9 @@ static int adis16480_write_raw(struct iio_dev *indio_dev,
                .type = IIO_PRESSURE, \
                .indexed = 1, \
                .channel = 0, \
-               .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
+                       BIT(IIO_CHAN_INFO_CALIBBIAS) | \
+                       BIT(IIO_CHAN_INFO_SCALE), \
                .address = ADIS16480_REG_BAROM_OUT, \
                .scan_index = ADIS16480_SCAN_BARO, \
                .scan_type = { \
@@ -652,9 +652,9 @@ static int adis16480_write_raw(struct iio_dev *indio_dev,
                .type = IIO_TEMP, \
                .indexed = 1, \
                .channel = 0, \
-               .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \
-                       IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
+                       BIT(IIO_CHAN_INFO_SCALE) | \
+                       BIT(IIO_CHAN_INFO_OFFSET), \
                .address = ADIS16480_REG_TEMP_OUT, \
                .scan_index = ADIS16480_SCAN_TEMP, \
                .scan_type = { \