iio:hid_sensors move to info_mask_(shared_by_type/separate)
authorJonathan Cameron <jic23@kernel.org>
Wed, 27 Feb 2013 19:03:04 +0000 (19:03 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 17 Mar 2013 19:49:18 +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>
drivers/iio/accel/hid-sensor-accel-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c

index dd8ea428493450cfce48dfb3161202d85b5d9177..bbcbd7101f337cae06f458eb73f6420ce230fd8f 100644 (file)
@@ -60,28 +60,28 @@ static const struct iio_chan_spec accel_3d_channels[] = {
                .type = IIO_ACCEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_X,
        }, {
                .type = IIO_ACCEL,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Y,
        }, {
                .type = IIO_ACCEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Z,
        }
 };
index fcfc83a9f86119a91899769632477f7005052c43..bc943dd47da5b6eb24e3f4b9b862cc9684227127 100644 (file)
@@ -60,28 +60,28 @@ static const struct iio_chan_spec gyro_3d_channels[] = {
                .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_X,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_X,
        }, {
                .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Y,
        }, {
                .type = IIO_ANGL_VEL,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Z,
        }
 };
index 3d7e8c9b4beb15eb9cce8f3790ea136701a77c79..80d68ff02d296df8ff1350208a720ed9e89fa4e5 100644 (file)
@@ -49,10 +49,10 @@ static const struct iio_chan_spec als_channels[] = {
                .type = IIO_INTENSITY,
                .modified = 1,
                .channel2 = IIO_MOD_LIGHT_BOTH,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_ILLUM,
        }
 };
index d8d01265220bfe5048be6adc3610524857a8b5df..99f4e494513b74da5608baa0c7298ea189311abf 100644 (file)
@@ -60,28 +60,28 @@ static const struct iio_chan_spec magn_3d_channels[] = {
                .type = IIO_MAGN,
                .modified = 1,
                .channel2 = IIO_MOD_X,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_X,
        }, {
                .type = IIO_MAGN,
                .modified = 1,
                .channel2 = IIO_MOD_Y,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Y,
        }, {
                .type = IIO_MAGN,
                .modified = 1,
                .channel2 = IIO_MOD_Z,
-               .info_mask = IIO_CHAN_INFO_OFFSET_SHARED_BIT |
-               IIO_CHAN_INFO_SCALE_SHARED_BIT |
-               IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT |
-               IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT,
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
+               BIT(IIO_CHAN_INFO_SCALE) |
+               BIT(IIO_CHAN_INFO_SAMP_FREQ) |
+               BIT(IIO_CHAN_INFO_HYSTERESIS),
                .scan_index = CHANNEL_SCAN_INDEX_Z,
        }
 };