IIO break info_mask into a pair of masks
Subsystems (11)
Jonathan Cameron
maintainerv2 cover IIO break info_mask into a pair of masks
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.
Well that was an 'interesting' way to start off this cycle :(
Version 1 message:
Hi All,
This has been on my todo list for a while. I'm not sure how we ever ended up with the mess that is the current info_mask bitmap of which properties exist for a given channel. Anyhow currently you have two types of bit in there, IIO_CHAN_INFO_SHARED_BIT (even) and IIO_CHAN_INFO_SEPARATE_BIT (odd). Whether we have odd or even elements is used to indicate whether we want an associated attribute specific to the channel, or one that is shared. E.g.
in_accel_x_scale (for just the x accel channel)
orin_accel_scale (for all accel channels)
in_illuminance0_calibbias
orin_illuminance_calibbias
This led to a horrible mess in iio.h where we had macros for each option of every element added to the info_mask. Also, a while back it became apparent that sometimes we have attributes shared across all channels irrespective of their type (sampling_frequency for example). Now the obvious solution to this would be to add a third type of info_mask element, but then things are getting rather silly.
Hence the proposed solution. Have separate info_mask elements for each of the two types of bit we had previously (others may follow).
Advantages:
1) More consise naming of elements
2) Drop all those hideous macros
3) More space (admitedly there are lots of other ways we could have gotten that).
Can't immediately think of any disadvantages other than the fact that we now have so many drivers this was rather time consuming to actually put together and almost certainly has some errors somewhere.
Jonathan
Jonathan Cameron (67):
iio: Add broken out info_mask fields for shared_by_type and separate iio:adc:max1363 move to info_mask_(shared_by_type/separate) staging:iio:dummy move to info_mask_(shared_by_type/separate) iio:hid_sensors move to info_mask_(shared_by_type/separate) iio:accel:kxsd9 move to info_mask_(shared_by_type/separate) iio:st_sensors move to info_mask_(shared_by_type/separate) iio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate) iio:adc:ad7266 move to info_mask_(shared_by_type/separate) iio:adc:ad7298 move to info_mask_(shared_by_type/separate) iio:adc:ad7476 move to info_mask_(shared_by_type/separate) iio:adc:ad7887 move to info_mask_(shared_by_type/separate) iio:adc:at91_adc move to info_mask_(shared_by_type/separate) iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate) iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate) iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate) iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate) iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate) iio:dac:ad5064 move to info_mask_(shared_by_type/separate) iio:dac:ad5360 move to info_mask_(shared_by_type/separate) iio:dac:ad5380 move to info_mask_(shared_by_type/separate) iio:dac:ad5421 move to info_mask_(shared_by_type/separate) iio:dac:ad5446 move to info_mask_(shared_by_type/separate) iio:dac:ad5449 move to info_mask_(shared_by_type/separate) iio:dac:ad5504 move to info_mask_(shared_by_type/separate) iio:dac:ad5624r move to info_mask_(shared_by_type/separate) iio:dac:ad5686 move to info_mask_(shared_by_type/separate) iio:dac:ad5755 move to info_mask_(shared_by_type/separate) iio:dac:ad5764 move to info_mask_(shared_by_type/separate) iio:dac:ad5791 move to info_mask_(shared_by_type/separate) iio:dac:max517 move to info_mask_(shared_by_type/separate) iio:dac:mcp4725 move to info_mask_(shared_by_type/separate) iio:freq:ad9523 move to info_mask_(shared_by_type/separate) iio:gyro:adis16080 move to info_mask_(shared_by_type/separate) iio:gyro:adis16136 move to info_mask_(shared_by_type/separate) iio:gyro:adxrs450 move to info_mask_(shared_by_type/separate) iio:gyro:itg3200_core move to info_mask_(shared_by_type/separate) iio:imu:adis16400 move to info_mask_(shared_by_type/separate) iio:imu:adis16480 move to info_mask_(shared_by_type/separate) iio:imu:mpu6050 move to info_mask_(shared_by_type/separate) iio:light:adjd_s311 move to info_mask_(shared_by_type/separate) iio:light:lm3533 move to info_mask_(shared_by_type/separate) iio:light:tsl2563 move to info_mask_(shared_by_type/separate) iio:light:vcnl4000 move to info_mask_(shared_by_type/separate) staging:iio:accel:adis move to info_mask_(shared_by_type/separate) staging:iio:accel:adis16220 move to
info_mask_(shared_by_type/separate)
staging:iio:accel:lis3l02dq move to
info_mask_(shared_by_type/separate)
staging:iio:accel:sca3000 move to info_mask_(shared_by_type/separate) staging:iio:adc:ad7280a move to info_mask_(shared_by_type/separate) staging:iio:adc:ad7291 move to info_mask_(shared_by_type/separate) staging:iio:adc:ad7606 move to info_mask_(shared_by_type/separate) staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate) staging:iio:cdc:ad7150 move to info_mask_(shared_by_type/separate) staging:iio:cdc:ad7152 move to info_mask_(shared_by_type/separate) staging:iio:cdc:ad7746 move to info_mask_(shared_by_type/separate) staging:iio:gyro:adis16060 move to info_mask_(shared_by_type/separate) staging:iio:gyro:adis16130 move to info_mask_(shared_by_type/separate) staging:iio:impedance:ad5933 move to
info_mask_(shared_by_type/separate)
staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate) staging:iio:light:isl29028 move to info_mask_(shared_by_type/separate) staging:iio:light:tsl2x7x move to info_mask_(shared_by_type/separate) staging:iio:mag:ak8975 move to info_mask_(shared_by_type/separate) staging:iio:magnetometer:hmc5843 move to
info_mask_(shared_by_type/separate)
staging:iio:meter:ade7758 move to info_mask_(shared_by_type/separate) staging:iio:resolver:ad2s1200 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s1210 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s90 move to
info_mask_(shared_by_type/separate)
iio:core drop info_mask from struct iio_info
drivers/iio/accel/hid-sensor-accel-3d.c | 24 ++++---- drivers/iio/accel/kxsd9.c | 6 +- drivers/iio/adc/ad7266.c | 12 ++-- drivers/iio/adc/ad7298.c | 10 ++-- drivers/iio/adc/ad7476.c | 10 ++-- drivers/iio/adc/ad7887.c | 8 +-- drivers/iio/adc/at91_adc.c | 4 +- drivers/iio/adc/lp8788_adc.c | 4 +- drivers/iio/adc/max1363.c | 9 +-- drivers/iio/adc/ti-adc081c.c | 4 +- drivers/iio/adc/ti_am335x_adc.c | 2 +- drivers/iio/adc/viperboard_adc.c | 2 +- drivers/iio/amplifiers/ad8366.c | 2 +- drivers/iio/dac/ad5064.c | 4 +- drivers/iio/dac/ad5360.c | 10 ++-- drivers/iio/dac/ad5380.c | 8 +-- drivers/iio/dac/ad5421.c | 10 ++-- drivers/iio/dac/ad5446.c | 4 +- drivers/iio/dac/ad5449.c | 4 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 4 +- drivers/iio/dac/ad5686.c | 6 +- drivers/iio/dac/ad5755.c | 10 ++-- drivers/iio/dac/ad5764.c | 10 ++-- drivers/iio/dac/ad5791.c | 6 +- drivers/iio/dac/max517.c | 4 +- drivers/iio/dac/mcp4725.c | 4 +- drivers/iio/frequency/ad9523.c | 8 +-- drivers/iio/gyro/adis16080.c | 22 +++---- drivers/iio/gyro/adis16136.c | 13 ++-- drivers/iio/gyro/adxrs450.c | 22 +++---- drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++---- drivers/iio/gyro/itg3200_core.c | 13 ++-- drivers/iio/imu/adis16400_core.c | 47 +++++++-------- drivers/iio/imu/adis16480.c | 32 +++++----- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 ++-- drivers/iio/industrialio-core.c | 27 ++++++--- drivers/iio/light/adjd_s311.c | 4 +- drivers/iio/light/hid-sensor-als.c | 8 +-- drivers/iio/light/lm3533-als.c | 6 +- drivers/iio/light/tsl2563.c | 10 ++-- drivers/iio/light/vcnl4000.c | 6 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 24 ++++---- drivers/staging/iio/accel/adis16201_core.c | 8 +-- drivers/staging/iio/accel/adis16203_core.c | 2 +- drivers/staging/iio/accel/adis16204_core.c | 8 +-- drivers/staging/iio/accel/adis16209_core.c | 4 +- drivers/staging/iio/accel/adis16220_core.c | 26 ++++---- drivers/staging/iio/accel/adis16240_core.c | 9 +-- drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++-- drivers/staging/iio/accel/sca3000_core.c | 5 +- drivers/staging/iio/adc/ad7280a.c | 12 ++-- drivers/staging/iio/adc/ad7291.c | 10 ++-- drivers/staging/iio/adc/ad7606_core.c | 4 +- drivers/staging/iio/adc/ad799x_core.c | 76 ++++++++++++------------ drivers/staging/iio/cdc/ad7150.c | 8 +-- drivers/staging/iio/cdc/ad7152.c | 32 +++++----- drivers/staging/iio/cdc/ad7746.c | 48 +++++++-------- drivers/staging/iio/gyro/adis16060_core.c | 11 ++-- drivers/staging/iio/gyro/adis16130_core.c | 4 +- drivers/staging/iio/gyro/adis16260_core.c | 4 +- drivers/staging/iio/iio_simple_dummy.c | 33 +++++------ drivers/staging/iio/impedance-analyzer/ad5933.c | 10 ++-- drivers/staging/iio/light/isl29018.c | 8 +-- drivers/staging/iio/light/isl29028.c | 10 ++-- drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++------- drivers/staging/iio/magnetometer/ak8975.c | 4 +- drivers/staging/iio/magnetometer/hmc5843.c | 4 +- drivers/staging/iio/meter/ade7758_core.c | 60 +++++++++---------- drivers/staging/iio/resolver/ad2s1200.c | 4 +- drivers/staging/iio/resolver/ad2s1210.c | 4 +- drivers/staging/iio/resolver/ad2s90.c | 2 +- include/linux/iio/adc/ad_sigma_delta.h | 6 +- include/linux/iio/common/st_sensors.h | 5 +- include/linux/iio/iio.h | 79 +++---------------------- include/linux/iio/imu/adis.h | 34 +++++------ 76 files changed, 489 insertions(+), 557 deletions(-)
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 1/67 iio: Add broken out info_mask fields for shared_by_type and separate
This simplifies the code, removes an extensive layer of 'helper' macros and gives us twice as much room to play with in these masks before we have any need to be clever.
--- drivers/iio/industrialio-core.c | 30 ++++++++++++++++++++++++++++++ include/linux/iio/iio.h | 10 +++++++++- 2 files changed, 39 insertions(+), 1 deletion(-)
drivers/iio/industrialio-core.c +30 -0
@@ -708,6 +708,36 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev, goto error_ret; attrcount++; } +for_each_set_bit (i, &chan->info_mask_separate,sizeof (long )*8 ) { + ret =__iio_add_chan_devattr (iio_chan_info_postfix[i], + chan, + &iio_read_channel_info, + &iio_write_channel_info, + i, +0 , + &indio_dev->dev, + &indio_dev->channel_attr_list); +if (ret <0 ) + goto error_ret; + attrcount++; + } +for_each_set_bit (i, &chan->info_mask_shared_by_type,sizeof (long )*8 ) { + ret =__iio_add_chan_devattr (iio_chan_info_postfix[i], + chan, + &iio_read_channel_info, + &iio_write_channel_info, + i, +1 , + &indio_dev->dev, + &indio_dev->channel_attr_list); +if (ret == -EBUSY ) { + ret =0 ; +continue ; + }else if (ret <0 ) { + goto error_ret; + } + attrcount++; + }if (chan->ext_info) {unsigned int i =0 ;
include/linux/iio/iio.h +9 -1
@@ -218,6 +218,10 @@ ssize_t iio_enum_write(struct iio_dev *indio_dev,* endianness: little or big endian * @info_mask: What information is to be exported about this channel. * This includes calibbias, scale etc. +* @info_mask_separate: What information is to be exported that is specific to +* this channel. +* @info_mask_shared_by_type: What information is to be exported that is shared +* by all channels of the same type. * @event_mask: What events can this channel produce. * @ext_info: Array of extended info attributes for this channel. * The array is NULL terminated, the last element should
@@ -253,6 +257,8 @@ struct iio_chan_spec {enum iio_endian endianness; } scan_type;long info_mask; +long info_mask_separate; +long info_mask_shared_by_type;long event_mask;const struct iio_chan_spec_ext_info *ext_info;const char *extend_name;
@@ -275,7 +281,9 @@ struct iio_chan_spec {static inline bool iio_channel_has_info (const struct iio_chan_spec *chan,enum iio_chan_info_enum type) { -return chan->info_mask &IIO_CHAN_INFO_BITS (type); +return (chan->info_mask &IIO_CHAN_INFO_BITS (type)) | + (chan->info_mask_separate & type) | + (chan->info_mask_shared_by_type & type); }#define IIO_ST (si, rb, sb, sh) \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 2/67 iio:adc:max1363 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/max1363.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/iio/adc/max1363.c +5 -4
@@ -427,15 +427,15 @@ static const enum max1363_modes max1363_mode_list[] = {#define MAX1363_EV_M \ (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) \ | IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING)) -#define MAX1363_INFO_MASK (IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT) +#define MAX1363_CHAN_U (num, addr, si, bits, evmask) \ { \ .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = num, \ .address = addr, \ - .info_mask = MAX1363_INFO_MASK, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .datasheet_name = "AIN"#num, \ .scan_type = { \ .sign = 'u', \
@@ -456,7 +456,8 @@ static const enum max1363_modes max1363_mode_list[] = { .channel = num, \ .channel2 = num2, \ .address = addr, \ - .info_mask = MAX1363_INFO_MASK, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .datasheet_name = "AIN"#num"-AIN"#num2, \ .scan_type = { \ .sign = 's', \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 3/67 staging:iio:dummy move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/iio_simple_dummy.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-)
drivers/staging/iio/iio_simple_dummy.c +15 -18
@@ -71,25 +71,25 @@ static const struct iio_chan_spec iio_dummy_channels[] = { .indexed = 1, .channel = 0,/* What other information is available? */ - .info_mask = + .info_mask_separate =/* * in_voltage0_raw * Raw (unscaled no bias removal etc) measurement * from the device. */ -IIO_CHAN_INFO_RAW_SEPARATE_BIT | +BIT (IIO_CHAN_INFO_RAW ) |/* * in_voltage0_offset * Offset for userspace to apply prior to scale * when converting to standard units (microvolts) */ -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | +BIT (IIO_CHAN_INFO_OFFSET ) |/* * in_voltage0_scale * Multipler for userspace to apply post offset * when converting to standard units (microvolts) */ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + BIT(IIO_CHAN_INFO_SCALE),/* The ordering of elements in the buffer via an enum */ .scan_index = voltage0, .scan_type = { /* Description of storage in buffer */
@@ -118,19 +118,18 @@ static const struct iio_chan_spec iio_dummy_channels[] = { .indexed = 1, .channel = 1, .channel2 = 2, - .info_mask =/* * in_voltage1-voltage2_raw * Raw (unscaled no bias removal etc) measurement * from the device. */ -IIO_CHAN_INFO_RAW_SEPARATE_BIT | + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),/* * in_voltage-voltage_scale * Shared version of scale - shared by differential * input channels of type IIO_VOLTAGE. */ - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .scan_index = diffvoltage1m2, .scan_type = { /* Description of storage in buffer */ .sign = 's', /* signed */
@@ -146,9 +145,8 @@ static const struct iio_chan_spec iio_dummy_channels[] = { .indexed = 1, .channel = 3, .channel2 = 4, - .info_mask = -IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .scan_index = diffvoltage3m4, .scan_type = { .sign = 's',
@@ -166,15 +164,14 @@ static const struct iio_chan_spec iio_dummy_channels[] = { .modified = 1,/* Channel 2 is use for modifiers */ .channel2 = IIO_MOD_X, - .info_mask = -IIO_CHAN_INFO_RAW_SEPARATE_BIT | + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) |/* * Internal bias correction value. Applied * by the hardware or driver prior to userspace * seeing the readings. Typically part of hardware * calibration. */ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, + BIT(IIO_CHAN_INFO_CALIBBIAS), .scan_index = accelx, .scan_type = { /* Description of storage in buffer */ .sign = 's', /* signed */
@@ -191,7 +188,7 @@ static const struct iio_chan_spec iio_dummy_channels[] = {/* DAC channel out_voltage0_raw */ { .type = IIO_VOLTAGE, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .output = 1, .indexed = 1, .channel = 0,
@@ -204,8 +201,8 @@ static const struct iio_chan_spec iio_dummy_channels[] = {* @chan: the channel whose data is to be read * @val: first element of returned value (typically INT) * @val2: second element of returned value (typically MICRO) -* @mask: what we actually want to read. 0 is the channel, everything else -* is as per the info_mask in iio_chan_spec. +* @mask: what we actually want to read as per the info_mask_* +* in iio_chan_spec. */ static int iio_dummy_read_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan,
@@ -287,8 +284,8 @@ static int iio_dummy_read_raw(struct iio_dev *indio_dev,* @chan: the channel whose data is to be written * @val: first element of value to set (typically INT) * @val2: second element of value to set (typically MICRO) -* @mask: what we actually want to write. 0 is the channel, everything else -* is as per the info_mask in iio_chan_spec. +* @mask: what we actually want to write as per the info_mask_* +* in iio_chan_spec. * * Note that all raw writes are assumed IIO_VAL_INT and info mask elements * are assumed to be IIO_INT_PLUS_MICRO unless the callback write_raw_get_fmt
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 4/67 iio:hid_sensors move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/accel/hid-sensor-accel-3d.c | 24 ++++++++++++------------ drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++++++++++------------ drivers/iio/light/hid-sensor-als.c | 8 ++++---- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 24 ++++++++++++------------ 4 files changed, 40 insertions(+), 40 deletions(-)
drivers/iio/accel/hid-sensor-accel-3d.c +12 -12
@@ -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, } };
drivers/iio/gyro/hid-sensor-gyro-3d.c +12 -12
@@ -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, } };
drivers/iio/light/hid-sensor-als.c +4 -4
@@ -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, } };
drivers/iio/magnetometer/hid-sensor-magn-3d.c +12 -12
@@ -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, } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 5/67 iio:accel:kxsd9 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/accel/kxsd9.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/accel/kxsd9.c +3 -3
@@ -177,8 +177,8 @@ error_ret: .type = IIO_ACCEL, \ .modified = 1, \ .channel2 = IIO_MOD_##axis, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = KXSD9_REG_##axis, \ }
@@ -186,7 +186,7 @@ static const struct iio_chan_spec kxsd9_channels[] = { KXSD9_ACCEL_CHAN(X), KXSD9_ACCEL_CHAN(Y), KXSD9_ACCEL_CHAN(Z), { .type =IIO_VOLTAGE , - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .indexed = 1, .address = KXSD9_REG_AUX, }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 6/67 iio:st_sensors move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- include/linux/iio/common/st_sensors.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/iio/common/st_sensors.h +3 -2
@@ -15,6 +15,7 @@#include <linux/spi/spi.h> #include <linux/irqreturn.h> #include <linux/iio/trigger.h> +#include <linux/bitops.h> #define ST_SENSORS_TX_MAX_LENGTH 2#define ST_SENSORS_RX_MAX_LENGTH 6
@@ -45,8 +46,8 @@ { \ .type = device_type, \ .modified = 1, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .scan_index = index, \ .channel2 = mod, \ .address = addr, \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 7/67 iio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- include/linux/iio/adc/ad_sigma_delta.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/iio/adc/ad_sigma_delta.h +3 -3
@@ -133,9 +133,9 @@ int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig); .channel2 = (_channel2), \ .address = (_address), \ .extend_name = (_extend_name), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ + BIT(IIO_CHAN_INFO_OFFSET), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .scan_index = (_si), \ .scan_type = { \ .sign = 'u', \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 8/67 iio:adc:ad7266 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ad7266.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/iio/adc/ad7266.c +6 -6
@@ -201,9 +201,9 @@ static int ad7266_read_raw(struct iio_dev *indio_dev, .indexed = 1, \ .channel = (_chan), \ .address = (_chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT \ - |IIO_CHAN_INFO_SCALE_SHARED_BIT \ - | IIO_CHAN_INFO_OFFSET_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ) \ + | BIT(IIO_CHAN_INFO_OFFSET), \ .scan_index = (_chan), \ .scan_type = { \ .sign = (_sign), \
@@ -249,9 +249,9 @@ static AD7266_DECLARE_SINGLE_ENDED_CHANNELS_FIXED(s, 's'); .channel = (_chan) * 2, \ .channel2 = (_chan) * 2 + 1, \ .address = (_chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT \ - |IIO_CHAN_INFO_SCALE_SHARED_BIT \ - | IIO_CHAN_INFO_OFFSET_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ) \ + | BIT(IIO_CHAN_INFO_OFFSET), \ .scan_index = (_chan), \ .scan_type = { \ .sign = _sign, \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 9/67 iio:adc:ad7298 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ad7298.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/adc/ad7298.c +5 -5
@@ -63,8 +63,8 @@ struct ad7298_state { .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = index, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = index, \ .scan_index = index, \ .scan_type = { \
@@ -80,9 +80,9 @@ static const struct iio_chan_spec ad7298_channels[] = { .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 = AD7298_CH_TEMP, .scan_index = -1, .scan_type = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 10/67 iio:adc:ad7476 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ad7476.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/adc/ad7476.c +5 -5
@@ -140,12 +140,12 @@ static int ad7476_read_raw(struct iio_dev *indio_dev,return -EINVAL ; } -#define _AD7476_CHAN (bits, _shift, _info_mask) \ +#define _AD7476_CHAN (bits, _shift, _info_mask_sep) \ { \ .type = IIO_VOLTAGE, \ .indexed = 1, \ - .info_mask = _info_mask | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = _info_mask_sep, \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .scan_type = { \ .sign = 'u', \ .realbits = (bits), \
@@ -156,9 +156,9 @@ static int ad7476_read_raw(struct iio_dev *indio_dev, }#define AD7476_CHAN (bits) _AD7476_CHAN((bits), 13 - (bits), \ - IIO_CHAN_INFO_RAW_SEPARATE_BIT) + BIT(IIO_CHAN_INFO_RAW))#define AD7940_CHAN (bits) _AD7476_CHAN((bits), 15 - (bits), \ - IIO_CHAN_INFO_RAW_SEPARATE_BIT) + BIT(IIO_CHAN_INFO_RAW))#define AD7091R_CHAN (bits) _AD7476_CHAN((bits), 16 - (bits), 0)static const struct ad7476_chip_info ad7476_chip_info_tbl[] = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 11/67 iio:adc:ad7887 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ad7887.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/adc/ad7887.c +4 -4
@@ -207,8 +207,8 @@ static const struct ad7887_chip_info ad7887_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = 1, .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0),
@@ -217,8 +217,8 @@ static const struct ad7887_chip_info ad7887_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = 0, .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0),
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 12/67 iio:adc:at91_adc move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/at91_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/at91_adc.c +2 -2
@@ -140,8 +140,8 @@ static int at91_adc_channel_init(struct iio_dev *idev) chan->scan_type.sign ='u' ; chan->scan_type.realbits =10 ; chan->scan_type.storagebits =16 ; - chan->info_mask =IIO_CHAN_INFO_SCALE_SHARED_BIT | -IIO_CHAN_INFO_RAW_SEPARATE_BIT ; + chan->info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ); + chan->info_mask_separate =BIT (IIO_CHAN_INFO_RAW ); idx++; } timestamp = chan_array + idx;
Signature · 1 line
1.8.1.4
Re: [PATCH 12/67] iio:adc:at91_adc move to info_mask_(shared_by_type/separate)
Hi Jonathan,
Quoted 1 line · Jonathan Cameron
The original
info_maskis going away in favour of the broken out versions.
Maxime
Signature · 4 lines
Maxime Ripard, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Jonathan Cameron
maintainerPATCH v2 13/67 iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/lp8788_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/lp8788_adc.c +2 -2
@@ -132,8 +132,8 @@ static const struct iio_info lp8788_adc_info = { .type = _type, \ .indexed = 1, \ .channel = LPADC_##_id, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .datasheet_name = #_id, \ }
Signature · 1 line
1.8.1.4
RE: [PATCH 13/67] iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
Hi Jonathan,
Can I get the git tree location for the IIO subsystem if available? It looks this patch-set has not been merged yet in the staging-next.
Best Regards,
Milo
Quoted 35 lines
-----Original Message-----
From: Jonathan Cameron [mailto:[email protected]]
Sent: Sunday, March 03, 2013 1:17 AM
To: [email protected]
Cc: Jonathan Cameron; Kim, Milo
Subject: [PATCH 13/67] iio:adc:lp8778_adc move toinfo_mask_(shared_by_type/separate)
=20
The originalinfo_maskis going away in favour of the broken out versions.
=20Signed-off-by Jonathan Cameron <[email protected]>cc Milo(Woogyom) Kim <[email protected]>--- drivers/iio/adc/lp8788_adc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)=20
drivers/iio/adc/lp8788_adc.c +2
-2@@ -132,8 +132,8 @@ static const struct iio_info lp8788_adc_info =3D { .type =3D _type, \ .indexed =3D 1, \ .channel =3D LPADC_##_id, \ - .info_mask =3D IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate =3D BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .datasheet_name =3D #_id, \ }=20
--
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 14/67 iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ti-adc081c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/adc/ti-adc081c.c +2 -2
@@ -55,8 +55,8 @@ static int adc081c_read_raw(struct iio_dev *iio,static const struct iio_chan_spec adc081c_channel = { .type =IIO_VOLTAGE , - .info_mask =IIO_CHAN_INFO_SCALE_SHARED_BIT | -IIO_CHAN_INFO_RAW_SEPARATE_BIT , + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ), + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ), };static const struct iio_info adc081c_info = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 15/67 iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/ti_am335x_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti_am335x_adc.c +1 -1
@@ -89,7 +89,7 @@ static int tiadc_channel_init(struct iio_dev *indio_dev, int channels) chan->type =IIO_VOLTAGE ; chan->indexed =1 ; chan->channel = i; - chan->info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT ; + chan->info_mask_separate =BIT (IIO_CHAN_INFO_RAW ); } indio_dev->channels = chan_array;
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 16/67 iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/adc/viperboard_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/viperboard_adc.c +1 -1
@@ -41,7 +41,7 @@ struct vprbrd_adc { .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = _index, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ .scan_index = _index, \ .scan_type = { \ .sign = 'u', \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 17/67 iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/amplifiers/ad8366.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/amplifiers/ad8366.c +1 -1
@@ -125,7 +125,7 @@ static const struct iio_info ad8366_info = { .output = 1, \ .indexed = 1, \ .channel = _channel, \ - .info_mask = IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT,\ + .info_mask_separate = BIT(IIO_CHAN_INFO_HARDWAREGAIN),\ }static const struct iio_chan_spec ad8366_channels[] = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 18/67 iio:dac:ad5064 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5064.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5064.c +2 -2
@@ -297,8 +297,8 @@ static const struct iio_chan_spec_ext_info ad5064_ext_info[] = { .indexed = 1, \ .output = 1, \ .channel = (chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .address = AD5064_ADDR_DAC(chan), \ .scan_type = IIO_ST('u', (bits), 16, 20 - (bits)), \ .ext_info = ad5064_ext_info, \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 19/67 iio:dac:ad5360 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5360.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/dac/ad5360.c +5 -5
@@ -102,11 +102,11 @@ enum ad5360_type { .type = IIO_VOLTAGE, \ .indexed = 1, \ .output = 1, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ +BIT (IIO_CHAN_INFO_SCALE ) | \ +BIT (IIO_CHAN_INFO_OFFSET ) | \ +BIT (IIO_CHAN_INFO_CALIBSCALE ) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ .scan_type = IIO_ST('u', (bits), 16, 16 - (bits)) \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 20/67 iio:dac:ad5380 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5380.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/dac/ad5380.c +4 -4
@@ -257,10 +257,10 @@ static struct iio_chan_spec_ext_info ad5380_ext_info[] = { .type = IIO_VOLTAGE, \ .indexed = 1, \ .output = 1, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_SCALE_SHARED_BIT | \ -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ +BIT (IIO_CHAN_INFO_CALIBSCALE ) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .scan_type = IIO_ST('u', (_bits), 16, 14 - (_bits)), \ .ext_info = ad5380_ext_info, \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 21/67 iio:dac:ad5421 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5421.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/dac/ad5421.c +5 -5
@@ -86,11 +86,11 @@ static const struct iio_chan_spec ad5421_channels[] = { .indexed = 1, .output = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_SCALE_SHARED_BIT | -IIO_CHAN_INFO_OFFSET_SHARED_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_CALIBSCALE ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ) | + BIT(IIO_CHAN_INFO_OFFSET), .scan_type = IIO_ST('u', 16, 16, 0), .event_mask =IIO_EV_BIT (IIO_EV_TYPE_THRESH ,IIO_EV_DIR_RISING ) | IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING),
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 22/67 iio:dac:ad5446 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5446.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5446.c +2 -2
@@ -143,8 +143,8 @@ static const struct iio_chan_spec_ext_info ad5446_ext_info_powerdown[] = { .indexed = 1, \ .output = 1, \ .channel = 0, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .scan_type = IIO_ST('u', (bits), (storage), (shift)), \ .ext_info = (ext), \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 23/67 iio:dac:ad5449 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5449.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5449.c +2 -2
@@ -206,8 +206,8 @@ static const struct iio_info ad5449_info = { .indexed = 1, \ .output = 1, \ .channel = (chan), \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .address = (chan), \ .scan_type = IIO_ST('u', (bits), 16, 12 - (bits)), \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 24/67 iio:dac:ad5504 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5504.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5504.c +2 -2
@@ -259,8 +259,8 @@ static const struct iio_chan_spec_ext_info ad5504_ext_info[] = { .indexed = 1, \ .output = 1, \ .channel = (_chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = AD5504_ADDR_DAC(_chan), \ .scan_type = IIO_ST('u', 12, 16, 0), \ .ext_info = ad5504_ext_info, \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 25/67 iio:dac:ad5624r move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5624r_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/ad5624r_spi.c +2 -2
@@ -174,8 +174,8 @@ static const struct iio_chan_spec_ext_info ad5624r_ext_info[] = { .indexed = 1, \ .output = 1, \ .channel = (_chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = (_chan), \ .scan_type = IIO_ST('u', (_bits), 16, 16 - (_bits)), \ .ext_info = ad5624r_ext_info, \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 26/67 iio:dac:ad5686 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5686.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/dac/ad5686.c +3 -3
@@ -276,9 +276,9 @@ static const struct iio_chan_spec_ext_info ad5686_ext_info[] = { .indexed = 1, \ .output = 1, \ .channel = chan, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ - .address = AD5686_ADDR_DAC(chan), \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),\ + .address = AD5686_ADDR_DAC(chan), \ .scan_type = IIO_ST('u', bits, 16, shift), \ .ext_info = ad5686_ext_info, \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 27/67 iio:dac:ad5755 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5755.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/dac/ad5755.c +5 -5
@@ -393,11 +393,11 @@ static const struct iio_chan_spec_ext_info ad5755_ext_info[] = {#define AD5755_CHANNEL (_bits) { \ .indexed = 1, \ .output = 1, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_OFFSET) | \ + BIT(IIO_CHAN_INFO_CALIBSCALE) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ .scan_type = IIO_ST('u', (_bits), 16, 16 - (_bits)), \ .ext_info = ad5755_ext_info, \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 28/67 iio:dac:ad5764 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5764.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/dac/ad5764.c +5 -5
@@ -78,11 +78,11 @@ enum ad5764_type { .output = 1, \ .channel = (_chan), \ .address = (_chan), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_OFFSET_SHARED_BIT | \ -IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ +BIT (IIO_CHAN_INFO_SCALE ) | \ +BIT (IIO_CHAN_INFO_CALIBSCALE ) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET), \ .scan_type = IIO_ST('u', (_bits), 16, 16 - (_bits)) \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 29/67 iio:dac:ad5791 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/ad5791.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/dac/ad5791.c +3 -3
@@ -302,9 +302,9 @@ static const struct iio_chan_spec_ext_info ad5791_ext_info[] = { .indexed = 1, \ .address = AD5791_ADDR_DAC0, \ .channel = 0, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_OFFSET_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_OFFSET), \ .scan_type = IIO_ST('u', bits, 24, shift), \ .ext_info = ad5791_ext_info, \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 30/67 iio:dac:max517 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/max517.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/max517.c +2 -2
@@ -146,8 +146,8 @@ static const struct iio_info max517_info = { .indexed = 1, \ .output = 1, \ .channel = (chan), \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .scan_type = IIO_ST('u', 8, 8, 0), \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 31/67 iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/dac/mcp4725.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/dac/mcp4725.c +2 -2
@@ -69,8 +69,8 @@ static const struct iio_chan_spec mcp4725_channel = { .indexed = 1, .output = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .scan_type = IIO_ST('u', 12, 16, 0), };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 32/67 iio:freq:ad9523 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/frequency/ad9523.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iio/frequency/ad9523.c +4 -4
@@ -920,10 +920,10 @@ static int ad9523_setup(struct iio_dev *indio_dev) st->ad9523_channels[i].channel = chan->channel_num; st->ad9523_channels[i].extend_name = chan->extended_name; - st->ad9523_channels[i].info_mask = -IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_PHASE_SEPARATE_BIT | -IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT ; + st->ad9523_channels[i].info_mask_separate = +BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_PHASE ) | +BIT (IIO_CHAN_INFO_FREQUENCY ); } }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 33/67 iio:gyro:adis16080 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/gyro/adis16080.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/iio/gyro/adis16080.c +11 -11
@@ -136,32 +136,32 @@ static const struct iio_chan_spec adis16080_channels[] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_Z, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), .address = ADIS16080_DIN_GYRO, }, { .type = IIO_VOLTAGE, .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 = ADIS16080_DIN_AIN1, }, { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .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 = ADIS16080_DIN_AIN2, }, { .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 = ADIS16080_DIN_TEMP, } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 34/67 iio:gyro:adis16136 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/gyro/adis16136.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
drivers/iio/gyro/adis16136.c +7 -6
@@ -357,10 +357,11 @@ static const struct iio_chan_spec adis16136_channels[] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_X, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT | - IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_CALIBBIAS) | + BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), + .address = ADIS16136_REG_GYRO_OUT2, .scan_index = ADIS16136_SCAN_GYRO, .scan_type = {
@@ -373,8 +374,8 @@ static const struct iio_chan_spec adis16136_channels[] = { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), .address = ADIS16136_REG_TEMP_OUT, .scan_index = ADIS16136_SCAN_TEMP, .scan_type = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 35/67 iio:gyro:adxrs450 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/gyro/adxrs450.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-)
drivers/iio/gyro/adxrs450.c +11 -11
@@ -383,16 +383,16 @@ static const struct iio_chan_spec adxrs450_channels[2][2] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_Z, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_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_QUADRATURE_CORRECTION_RAW ) | + BIT(IIO_CHAN_INFO_SCALE), }, { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_SCALE), } }, [ID_ADXRS453] = {
@@ -400,15 +400,15 @@ static const struct iio_chan_spec adxrs450_channels[2][2] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_Z, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT | - IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE) | + BIT(IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW), }, { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), } }, };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 36/67 iio:gyro:itg3200_core move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/gyro/itg3200_core.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/iio/gyro/itg3200_core.c +5 -8
@@ -248,12 +248,6 @@ err_ret:return ret; } -#define ITG3200_TEMP_INFO_MASK (IIO_CHAN_INFO_OFFSET_SHARED_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_RAW_SEPARATE_BIT) -#define ITG3200_GYRO_INFO_MASK (IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_RAW_SEPARATE_BIT) -#define ITG3200_ST \ { .sign = 's', .realbits = 16, .storagebits = 16, .endianness = IIO_BE }
@@ -261,7 +255,8 @@ err_ret: .type = IIO_ANGL_VEL, \ .modified = 1, \ .channel2 = IIO_MOD_ ## _mod, \ - .info_mask = ITG3200_GYRO_INFO_MASK, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = ITG3200_REG_GYRO_ ## _mod ## OUT_H, \ .scan_index = ITG3200_SCAN_GYRO_ ## _mod, \ .scan_type = ITG3200_ST, \
@@ -271,7 +266,9 @@ static const struct iio_chan_spec itg3200_channels[] = { { .type = IIO_TEMP, .channel2 = IIO_NO_MOD, - .info_mask = ITG3200_TEMP_INFO_MASK, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_OFFSET ) | + BIT(IIO_CHAN_INFO_SCALE), .address = ITG3200_REG_TEMP_OUT_H, .scan_index = ITG3200_SCAN_TEMP, .scan_type = ITG3200_ST,
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 37/67 iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-)
drivers/iio/imu/adis16400_core.c +23 -24
@@ -484,8 +484,7 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .indexed = 1, \ .channel = 0, \ .extend_name = name, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = IIO_CHAN_INFO_RAW | IIO_CHAN_INFO_SCALE, \ .address = (addr), \ .scan_index = (si), \ .scan_type = { \
@@ -507,10 +506,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_ANGL_VEL, \ .modified = 1, \ .channel2 = IIO_MOD_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \ .address = addr, \ .scan_index = ADIS16400_SCAN_GYRO_ ## mod, \ .scan_type = { \
@@ -526,10 +525,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_ACCEL, \ .modified = 1, \ .channel2 = IIO_MOD_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \ .address = (addr), \ .scan_index = ADIS16400_SCAN_ACC_ ## mod, \ .scan_type = { \
@@ -545,9 +544,9 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_MAGN, \ .modified = 1, \ .channel2 = IIO_MOD_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \ + BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \ .address = (addr), \ .scan_index = ADIS16400_SCAN_MAGN_ ## mod, \ .scan_type = { \
@@ -568,10 +567,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .indexed = 1, \ .channel = 0, \ .extend_name = ADIS16400_MOD_TEMP_NAME_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_OFFSET) | \ + BIT(IIO_CHAN_INFO_SCALE), \ + .info_mask_shared_by_type = \ + BIT(IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY), \ .address = (addr), \ .scan_index = ADIS16350_SCAN_TEMP_ ## mod, \ .scan_type = { \
@@ -587,9 +587,8 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_TEMP, \ .indexed = 1, \ .channel = 0, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = IIO_CHAN_INFO_RAW | IIO_CHAN_INFO_OFFSET | \ + IIO_CHAN_INFO_SCALE, \ .address = (addr), \ .scan_index = ADIS16350_SCAN_TEMP_X, \ .scan_type = { \
@@ -605,8 +604,8 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_INCLI, \ .modified = 1, \ .channel2 = IIO_MOD_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = (addr), \ .scan_index = ADIS16300_SCAN_INCLI_ ## mod, \ .scan_type = { \
@@ -646,8 +645,8 @@ static const struct iio_chan_spec adis16448_channels[] = { ADIS16400_MAGN_CHAN(Z, ADIS16400_ZMAGN_OUT, 16), { .type = IIO_PRESSURE, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = ADIS16448_BARO_OUT, .scan_index = ADIS16400_SCAN_BARO, .scan_type = IIO_ST('s', 16, 16, 0),
Signature · 1 line
1.8.1.4
Re: [PATCH 37/67] iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
Quoted 13 lines · Jonathan Cameron
The original
info_maskis going away in favour of the broken out versions.Signed-off-by Jonathan Cameron <[email protected]>cc Lars-Peter Clausen <[email protected]>--- drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-)drivers/iio/imu/adis16400_core.c +0
-0
drivers/iio/imu/adis16400_core.c static int adis16400_read_raw(struct iio_dev *indio_dev, · line 487
Quoted 6 lines
drivers/iio/imu/adis16400_core.c +1
-2@@ -484,8 +484,7 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .indexed = 1, \ .channel = 0, \ .extend_name = name, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = IIO_CHAN_INFO_RAW | IIO_CHAN_INFO_SCALE, \
BIT is missing.
drivers/iio/imu/adis16400_core.c static int adis16400_read_raw(struct iio_dev *indio_dev, · line 591
Quoted 9 lines
drivers/iio/imu/adis16400_core.c +2
-3@@ -587,9 +587,8 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_TEMP, \ .indexed = 1, \ .channel = 0, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate =IIO_CHAN_INFO_RAW |IIO_CHAN_INFO_OFFSET | \ + IIO_CHAN_INFO_SCALE, \
BIT is missing.
Jonathan Cameron
maintainerRe: [PATCH 37/67] iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
Quoted 23 lines · Lars-Peter Clausen
Quoted 13 lines · Jonathan Cameron
The original
info_maskis going away in favour of the broken out versions.Signed-off-by Jonathan Cameron <[email protected]>cc Lars-Peter Clausen <[email protected]>--- drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 24 deletions(-)drivers/iio/imu/adis16400_core.c +0
-0drivers/iio/imu/adis16400_core.c static int adis16400_read_raw(struct iio_dev *indio_dev, · line 487
Quoted 6 lines
drivers/iio/imu/adis16400_core.c +1
-2@@ -484,8 +484,7 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .indexed = 1, \ .channel = 0, \ .extend_name = name, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = IIO_CHAN_INFO_RAW | IIO_CHAN_INFO_SCALE, \BIT is missing.
Quoted 12 lines
drivers/iio/imu/adis16400_core.c static int adis16400_read_raw(struct iio_dev *indio_dev, · line 591
Quoted 9 lines
drivers/iio/imu/adis16400_core.c +2
-3@@ -587,9 +587,8 @@ static int adis16400_read_raw(struct iio_dev *indio_dev, .type = IIO_TEMP, \ .indexed = 1, \ .channel = 0, \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate =IIO_CHAN_INFO_RAW |IIO_CHAN_INFO_OFFSET | \ + IIO_CHAN_INFO_SCALE, \BIT is missing.
Thanks, updated tree with this fixed in the info_mask_separate branch.
Jonathan Cameron
maintainerPATCH v2 38/67 iio:imu:adis16480 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/imu/adis16480.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/iio/imu/adis16480.c +16 -16
@@ -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 = { \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 39/67 iio:imu:mpu6050 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +5 -5
@@ -544,8 +544,8 @@ static int inv_mpu6050_validate_trigger(struct iio_dev *indio_dev, .type = _type, \ .modified = 1, \ .channel2 = _channel2, \ - .info_mask =IIO_CHAN_INFO_SCALE_SHARED_BIT \ - | IIO_CHAN_INFO_RAW_SEPARATE_BIT, \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ .scan_index = _index, \ .scan_type = { \ .sign = 's', \
@@ -564,9 +564,9 @@ static const struct iio_chan_spec inv_mpu_channels[] = {*/ { .type = IIO_TEMP, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT - |IIO_CHAN_INFO_OFFSET_SEPARATE_BIT - | IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) + |BIT (IIO_CHAN_INFO_OFFSET ) + | BIT(IIO_CHAN_INFO_SCALE), .scan_index =-1 , }, INV_MPU6050_CHAN(IIO_ANGL_VEL, IIO_MOD_X, INV_MPU6050_SCAN_GYRO_X),
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 40/67 iio:light:adjd_s311 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/light/adjd_s311.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iio/light/adjd_s311.c +2 -2
@@ -207,8 +207,8 @@ static const struct iio_chan_spec_ext_info adjd_s311_ext_info[] = { .type = IIO_INTENSITY, \ .modified = 1, \ .address = (IDX_##_color), \ - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT, \ + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | \ + BIT(IIO_CHAN_INFO_HARDWAREGAIN), \ .channel2 = (IIO_MOD_LIGHT_##_color), \ .scan_index = (_scan_idx), \ .scan_type = IIO_ST('u', 10, 16, 0), \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 41/67 iio:light:lm3533 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/light/lm3533-als.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/lm3533-als.c +3 -3
@@ -231,7 +231,7 @@ static int lm3533_als_read_raw(struct iio_dev *indio_dev, .channel = _channel, \ .indexed = true, \ .output = true, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ }static const struct iio_chan_spec lm3533_als_channels[] = {
@@ -239,8 +239,8 @@ static const struct iio_chan_spec lm3533_als_channels[] = { .type = IIO_LIGHT, .channel = 0, .indexed = true, - .info_mask = (IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_RAW_SEPARATE_BIT ), + .info_mask_separate =BIT (IIO_CHAN_INFO_AVERAGE_RAW ) | +BIT (IIO_CHAN_INFO_RAW ), },CHANNEL_CURRENT (0 ), CHANNEL_CURRENT(1),
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 42/67 iio:light:tsl2563 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/light/tsl2563.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/iio/light/tsl2563.c +5 -5
@@ -530,14 +530,14 @@ static const struct iio_chan_spec tsl2563_channels[] = { { .type = IIO_LIGHT, .indexed = 1, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .channel = 0, }, { .type = IIO_INTENSITY, .modified = 1, .channel2 = IIO_MOD_LIGHT_BOTH, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_CALIBSCALE), .event_mask = (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) | IIO_EV_BIT(IIO_EV_TYPE_THRESH,
@@ -546,8 +546,8 @@ static const struct iio_chan_spec tsl2563_channels[] = { .type = IIO_INTENSITY, .modified = 1, .channel2 = IIO_MOD_LIGHT_IR, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_CALIBSCALE), } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 43/67 iio:light:vcnl4000 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/iio/light/vcnl4000.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/light/vcnl4000.c +3 -3
@@ -93,11 +93,11 @@ static int vcnl4000_measure(struct vcnl4000_data *data, u8 req_mask,static const struct iio_chan_spec vcnl4000_channels[] = { { .type =IIO_LIGHT , - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_SCALE_SEPARATE_BIT , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_SCALE ), }, { .type =IIO_PROXIMITY , - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ), } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 44/67 staging:iio:accel:adis move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/accel/adis16201_core.c | 8 +++---- drivers/staging/iio/accel/adis16203_core.c | 2 +- drivers/staging/iio/accel/adis16204_core.c | 8 +++---- drivers/staging/iio/accel/adis16209_core.c | 4 ++-- drivers/staging/iio/accel/adis16240_core.c | 9 +++----- drivers/staging/iio/gyro/adis16260_core.c | 4 ++-- include/linux/iio/imu/adis.h | 34 +++++++++++++++--------------- 7 files changed, 32 insertions(+), 37 deletions(-)
drivers/staging/iio/accel/adis16201_core.c +4 -4
@@ -134,14 +134,14 @@ static const struct iio_chan_spec adis16201_channels[] = {ADIS_SUPPLY_CHAN (ADIS16201_SUPPLY_OUT ,ADIS16201_SCAN_SUPPLY ,12 ),ADIS_TEMP_CHAN (ADIS16201_TEMP_OUT ,ADIS16201_SCAN_TEMP ,12 ),ADIS_ACCEL_CHAN (X ,ADIS16201_XACCL_OUT ,ADIS16201_SCAN_ACC_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),ADIS_ACCEL_CHAN (Y ,ADIS16201_YACCL_OUT ,ADIS16201_SCAN_ACC_Y , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),ADIS_AUX_ADC_CHAN (ADIS16201_AUX_ADC ,ADIS16201_SCAN_AUX_ADC ,12 ),ADIS_INCLI_CHAN (X ,ADIS16201_XINCL_OUT ,ADIS16201_SCAN_INCLI_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),ADIS_INCLI_CHAN (X ,ADIS16201_YINCL_OUT ,ADIS16201_SCAN_INCLI_Y , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ), IIO_CHAN_SOFT_TIMESTAMP(7) };
drivers/staging/iio/accel/adis16203_core.c +1 -1
@@ -102,7 +102,7 @@ static const struct iio_chan_spec adis16203_channels[] = {ADIS_SUPPLY_CHAN (ADIS16203_SUPPLY_OUT ,ADIS16203_SCAN_SUPPLY ,12 ),ADIS_AUX_ADC_CHAN (ADIS16203_AUX_ADC ,ADIS16203_SCAN_AUX_ADC ,12 ),ADIS_INCLI_CHAN (X ,ADIS16203_XINCL_OUT ,ADIS16203_SCAN_INCLI_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),/* Fixme: Not what it appears to be - see data sheet */ ADIS_INCLI_CHAN (Y ,ADIS16203_YINCL_OUT ,ADIS16203_SCAN_INCLI_Y ,0 ,14 ), ADIS_TEMP_CHAN(ADIS16203_TEMP_OUT, ADIS16203_SCAN_TEMP, 12),
drivers/staging/iio/accel/adis16204_core.c +3 -5
@@ -140,13 +140,11 @@ static const struct iio_chan_spec adis16204_channels[] = {ADIS_AUX_ADC_CHAN (ADIS16204_AUX_ADC ,ADIS16204_SCAN_AUX_ADC ,12 ),ADIS_TEMP_CHAN (ADIS16204_TEMP_OUT ,ADIS16204_SCAN_TEMP ,12 ),ADIS_ACCEL_CHAN (X ,ADIS16204_XACCL_OUT ,ADIS16204_SCAN_ACC_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ) |BIT (IIO_CHAN_INFO_PEAK ),14 ),ADIS_ACCEL_CHAN (Y ,ADIS16204_YACCL_OUT ,ADIS16204_SCAN_ACC_Y , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ) |BIT (IIO_CHAN_INFO_PEAK ),14 ),ADIS_ACCEL_CHAN (ROOT_SUM_SQUARED_X_Y ,ADIS16204_XY_RSS_OUT , -ADIS16204_SCAN_ACC_XY ,IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,14 ), +ADIS16204_SCAN_ACC_XY ,BIT (IIO_CHAN_INFO_PEAK ),14 ), IIO_CHAN_SOFT_TIMESTAMP(5), };
drivers/staging/iio/accel/adis16209_core.c +2 -2
@@ -133,9 +133,9 @@ static const struct iio_chan_spec adis16209_channels[] = {ADIS_SUPPLY_CHAN (ADIS16209_SUPPLY_OUT ,ADIS16209_SCAN_SUPPLY ,14 ),ADIS_TEMP_CHAN (ADIS16209_TEMP_OUT ,ADIS16209_SCAN_TEMP ,12 ),ADIS_ACCEL_CHAN (X ,ADIS16209_XACCL_OUT ,ADIS16209_SCAN_ACC_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),ADIS_ACCEL_CHAN (Y ,ADIS16209_YACCL_OUT ,ADIS16209_SCAN_ACC_Y , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT ,14 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ),14 ),ADIS_AUX_ADC_CHAN (ADIS16209_AUX_ADC ,ADIS16209_SCAN_AUX_ADC ,12 ),ADIS_INCLI_CHAN (X ,ADIS16209_XINCL_OUT ,ADIS16209_SCAN_INCLI_X ,0 ,14 ), ADIS_INCLI_CHAN(Y, ADIS16209_YINCL_OUT, ADIS16209_SCAN_INCLI_Y, 0, 14),
drivers/staging/iio/accel/adis16240_core.c +3 -6
@@ -176,14 +176,11 @@ static const struct iio_chan_spec adis16240_channels[] = {ADIS_SUPPLY_CHAN (ADIS16240_SUPPLY_OUT ,ADIS16240_SCAN_SUPPLY ,10 ),ADIS_AUX_ADC_CHAN (ADIS16240_AUX_ADC ,ADIS16240_SCAN_AUX_ADC ,10 ),ADIS_ACCEL_CHAN (X ,ADIS16240_XACCL_OUT ,ADIS16240_SCAN_ACC_X , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,10 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ) |BIT (IIO_CHAN_INFO_PEAK ),10 ),ADIS_ACCEL_CHAN (Y ,ADIS16240_YACCL_OUT ,ADIS16240_SCAN_ACC_Y , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,10 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ) |BIT (IIO_CHAN_INFO_PEAK ),10 ),ADIS_ACCEL_CHAN (Z ,ADIS16240_ZACCL_OUT ,ADIS16240_SCAN_ACC_Z , -IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | -IIO_CHAN_INFO_PEAK_SEPARATE_BIT ,10 ), +BIT (IIO_CHAN_INFO_CALIBBIAS ) |BIT (IIO_CHAN_INFO_PEAK ),10 ),ADIS_TEMP_CHAN (ADIS16240_TEMP_OUT ,ADIS16240_SCAN_TEMP ,10 ), IIO_CHAN_SOFT_TIMESTAMP(6) };
drivers/staging/iio/gyro/adis16260_core.c +2 -2
@@ -124,8 +124,8 @@ static IIO_DEVICE_ATTR(sampling_frequency_available,#define ADIS16260_GYRO_CHANNEL_SET (axis, mod) \ struct iio_chan_spec adis16260_channels_##axis[] = { \ ADIS_GYRO_CHAN(mod, ADIS16260_GYRO_OUT, ADIS16260_SCAN_GYRO, \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, 14), \ + BIT(IIO_CHAN_INFO_CALIBBIAS) | \ + BIT(IIO_CHAN_INFO_CALIBSCALE), 14), \ ADIS_INCLI_CHAN(mod, ADIS16260_ANGL_OUT, ADIS16260_SCAN_ANGL, 0, 14), \ ADIS_TEMP_CHAN(ADIS16260_TEMP_OUT, ADIS16260_SCAN_TEMP, 12), \ ADIS_SUPPLY_CHAN(ADIS16260_SUPPLY_OUT, ADIS16260_SCAN_SUPPLY, 12), \
include/linux/iio/imu/adis.h +17 -17
@@ -162,8 +162,8 @@ int adis_single_conversion(struct iio_dev *indio_dev, .indexed = 1, \ .channel = (chan), \ .extend_name = name, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .address = (addr), \ .scan_index = (si), \ .scan_type = { \
@@ -184,9 +184,9 @@ int adis_single_conversion(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 = (addr), \ .scan_index = (si), \ .scan_type = { \
@@ -197,13 +197,13 @@ int adis_single_conversion(struct iio_dev *indio_dev, }, \ } -#define ADIS_MOD_CHAN (_type, mod, addr, si, info, bits) { \ +#define ADIS_MOD_CHAN (_type, mod, addr, si, info_sep, bits) { \ .type = (_type), \ .modified = 1, \ .channel2 = IIO_MOD_ ## mod, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - info, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + info_sep, \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = (addr), \ .scan_index = (si), \ .scan_type = { \
@@ -214,17 +214,17 @@ int adis_single_conversion(struct iio_dev *indio_dev, }, \ } -#define ADIS_ACCEL_CHAN (mod, addr, si, info, bits) \ - ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info, bits) +#define ADIS_ACCEL_CHAN (mod, addr, si, info_sep, bits) \ + ADIS_MOD_CHAN(IIO_ACCEL, mod, addr, si, info_sep, bits) -#define ADIS_GYRO_CHAN (mod, addr, si, info, bits) \ - ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info, bits) +#define ADIS_GYRO_CHAN (mod, addr, si, info_sep, bits) \ + ADIS_MOD_CHAN(IIO_ANGL_VEL, mod, addr, si, info_sep, bits) -#define ADIS_INCLI_CHAN (mod, addr, si, info, bits) \ - ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info, bits) +#define ADIS_INCLI_CHAN (mod, addr, si, info_sep, bits) \ + ADIS_MOD_CHAN(IIO_INCLI, mod, addr, si, info_sep, bits) -#define ADIS_ROT_CHAN (mod, addr, si, info, bits) \ - ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info, bits) +#define ADIS_ROT_CHAN (mod, addr, si, info_sep, bits) \ + ADIS_MOD_CHAN(IIO_ROT, mod, addr, si, info_sep, bits)#ifdef CONFIG_IIO_ADIS_LIB_BUFFER
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 45/67 staging:iio:accel:adis16220 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/accel/adis16220_core.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/staging/iio/accel/adis16220_core.c +13 -13
@@ -344,37 +344,37 @@ static const struct iio_chan_spec adis16220_channels[] = { .indexed = 1, .channel = 0, .extend_name = "supply", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), .address = in_supply, }, { .type = IIO_ACCEL, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT | - IIO_CHAN_INFO_PEAK_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_OFFSET) | + BIT(IIO_CHAN_INFO_SCALE) | + BIT(IIO_CHAN_INFO_PEAK), .address = accel, }, { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_OFFSET) | + BIT(IIO_CHAN_INFO_SCALE), .address = temp, }, { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_OFFSET) | + BIT(IIO_CHAN_INFO_SCALE), .address = in_1, }, { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = in_2, } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 46/67 staging:iio:accel:lis3l02dq move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/staging/iio/accel/lis3l02dq_core.c +4 -7
@@ -501,12 +501,6 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)return IRQ_HANDLED ; } -#define LIS3L02DQ_INFO_MASK \ - (IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT | \ - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | \ - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT) -#define LIS3L02DQ_EVENT_MASK \ (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) | \ IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING))
@@ -516,7 +510,10 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private) .type = IIO_ACCEL, \ .modified = 1, \ .channel2 = mod, \ - .info_mask = LIS3L02DQ_INFO_MASK, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_CALIBSCALE) | \ + BIT(IIO_CHAN_INFO_CALIBBIAS), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = index, \ .scan_index = index, \ .scan_type = { \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 47/67 staging:iio:accel:sca3000 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/accel/sca3000_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/iio/accel/sca3000_core.c +2 -3
@@ -419,8 +419,6 @@ static IIO_DEVICE_ATTR(measurement_mode, S_IRUGO | S_IWUSR, static IIO_DEVICE_ATTR(revision, S_IRUGO, sca3000_show_rev, NULL, 0); -#define SCA3000_INFO_MASK \ - IIO_CHAN_INFO_RAW_SEPARATE_BIT | IIO_CHAN_INFO_SCALE_SHARED_BIT#define SCA3000_EVENT_MASK \ (IIO_EV_BIT(IIO_EV_TYPE_MAG, IIO_EV_DIR_RISING))
@@ -429,7 +427,8 @@ static IIO_DEVICE_ATTR(revision, S_IRUGO, sca3000_show_rev, NULL, 0); .type = IIO_ACCEL, \ .modified = 1, \ .channel2 = mod, \ - .info_mask = SCA3000_INFO_MASK, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),\ .address = index, \ .scan_index = index, \ .scan_type = { \
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 48/67 staging:iio:adc:ad7280a move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/adc/ad7280a.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/iio/adc/ad7280a.c +6 -6
@@ -503,9 +503,10 @@ static int ad7280_channel_init(struct ad7280_state *st) st->channels[cnt].channel = (dev *6 ) + ch -6 ; } st->channels[cnt].indexed =1 ; - st->channels[cnt].info_mask = -IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_SCALE_SHARED_BIT ; + st->channels[cnt].info_mask_separate = +BIT (IIO_CHAN_INFO_RAW ); + st->channels[cnt].info_mask_shared_by_type = +BIT (IIO_CHAN_INFO_SCALE ); st->channels[cnt].address =AD7280A_DEVADDR (dev) <<8 | ch; st->channels[cnt].scan_index = cnt;
@@ -521,9 +522,8 @@ static int ad7280_channel_init(struct ad7280_state *st) st->channels[cnt].channel2 = dev *6 ; st->channels[cnt].address =AD7280A_ALL_CELLS ; st->channels[cnt].indexed =1 ; - st->channels[cnt].info_mask = -IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_SCALE_SHARED_BIT ; + st->channels[cnt].info_mask_separate =BIT (IIO_CHAN_INFO_RAW ); + st->channels[cnt].info_mask_shared_by_type =BIT (IIO_CHAN_INFO_SCALE ); st->channels[cnt].scan_index = cnt; st->channels[cnt].scan_type.sign ='u' ; st->channels[cnt].scan_type.realbits =32 ;
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 49/67 staging:iio:adc:ad7291 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/adc/ad7291.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/adc/ad7291.c +5 -5
@@ -536,8 +536,8 @@ static int ad7291_read_raw(struct iio_dev *indio_dev,#define AD7291_VOLTAGE_CHAN (_chan) \ { \ .type = IIO_VOLTAGE, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .indexed = 1, \ .channel = _chan, \ .event_mask = IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING)|\
@@ -555,9 +555,9 @@ static const struct iio_chan_spec ad7291_channels[] = { AD7291_VOLTAGE_CHAN(7), { .type = IIO_TEMP, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_AVERAGE_RAW ) | + BIT(IIO_CHAN_INFO_SCALE), .indexed = 1, .channel = 0, .event_mask =
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 50/67 staging:iio:adc:ad7606 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/adc/ad7606_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/adc/ad7606_core.c +2 -2
@@ -235,8 +235,8 @@ static const struct attribute_group ad7606_attribute_group_range = { .indexed = 1, \ .channel = num, \ .address = num, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),\ .scan_index = num, \ .scan_type = IIO_ST('s', 16, 16, 0), \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 51/67 staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/adc/ad799x_core.c | 76 +++++++++++++++++------------------ 1 file changed, 38 insertions(+), 38 deletions(-)
drivers/staging/iio/adc/ad799x_core.c +38 -38
@@ -467,7 +467,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -475,7 +475,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -483,7 +483,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -491,7 +491,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -507,7 +507,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -515,7 +515,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -523,7 +523,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -531,7 +531,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -547,7 +547,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 8, 16, 4), },
@@ -555,7 +555,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 8, 16, 4), },
@@ -563,7 +563,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 8, 16, 4), },
@@ -571,7 +571,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 8, 16, 4), },
@@ -587,7 +587,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -596,7 +596,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -614,7 +614,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -624,7 +624,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .indexed = 1, .channel = 1, .scan_index = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK, },
@@ -632,7 +632,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -641,7 +641,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -659,7 +659,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -668,7 +668,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -677,7 +677,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -686,7 +686,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -704,7 +704,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -713,7 +713,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -722,7 +722,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -731,7 +731,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 10, 16, 2), .event_mask = AD799X_EV_MASK,
@@ -740,7 +740,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 4, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 4, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -748,7 +748,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 5, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 5, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -756,7 +756,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 6, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 6, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -764,7 +764,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 7, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 7, .scan_type = IIO_ST('u', 10, 16, 2), },
@@ -781,7 +781,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 0, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -790,7 +790,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 1, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -799,7 +799,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 2, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 2, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -808,7 +808,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 3, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 3, .scan_type = IIO_ST('u', 12, 16, 0), .event_mask = AD799X_EV_MASK,
@@ -817,7 +817,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 4, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 4, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -825,7 +825,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 5, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 5, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -833,7 +833,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 6, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 6, .scan_type = IIO_ST('u', 12, 16, 0), },
@@ -841,7 +841,7 @@ static const struct ad799x_chip_info ad799x_chip_info_tbl[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 7, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .scan_index = 7, .scan_type = IIO_ST('u', 12, 16, 0), },
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 52/67 staging:iio:cdc:ad7150 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/cdc/ad7150.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/iio/cdc/ad7150.c +4 -4
@@ -429,8 +429,8 @@ static const struct iio_chan_spec ad7150_channels[] = { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_AVERAGE_RAW), .event_mask =IIO_EV_BIT (IIO_EV_TYPE_THRESH ,IIO_EV_DIR_RISING ) | IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING) |
@@ -442,8 +442,8 @@ static const struct iio_chan_spec ad7150_channels[] = { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 1, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_AVERAGE_RAW), .event_mask =IIO_EV_BIT (IIO_EV_TYPE_THRESH ,IIO_EV_DIR_RISING ) | IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING) |
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 53/67 staging:iio:cdc:ad7152 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/cdc/ad7152.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-)
drivers/staging/iio/cdc/ad7152.c +16 -16
@@ -436,38 +436,38 @@ static const struct iio_chan_spec ad7152_channels[] = { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_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_CALIBSCALE) | + BIT(IIO_CHAN_INFO_CALIBBIAS) | + BIT(IIO_CHAN_INFO_SCALE), }, { .type = IIO_CAPACITANCE, .differential = 1, .indexed = 1, .channel = 0, .channel2 = 2, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_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_CALIBSCALE ) | +BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), }, { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 1, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_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_CALIBSCALE ) | +BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), }, { .type = IIO_CAPACITANCE, .differential = 1, .indexed = 1, .channel = 1, .channel2 = 3, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_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_CALIBSCALE ) | +BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), } };/*
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 54/67 staging:iio:cdc:ad7746 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/cdc/ad7746.c | 48 ++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 26 deletions(-)
drivers/staging/iio/cdc/ad7746.c +22 -26
@@ -123,8 +123,8 @@ static const struct iio_chan_spec ad7746_channels[] = { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address =AD7746_REG_VT_DATA_HIGH <<8 | AD7746_VTSETUP_VTMD_EXT_VIN, },
@@ -133,8 +133,8 @@ static const struct iio_chan_spec ad7746_channels[] = { .indexed = 1, .channel = 1, .extend_name = "supply", - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address =AD7746_REG_VT_DATA_HIGH <<8 | AD7746_VTSETUP_VTMD_VDD_MON, },
@@ -142,7 +142,7 @@ static const struct iio_chan_spec ad7746_channels[] = { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address =AD7746_REG_VT_DATA_HIGH <<8 | AD7746_VTSETUP_VTMD_INT_TEMP, },
@@ -150,7 +150,7 @@ static const struct iio_chan_spec ad7746_channels[] = { .type = IIO_TEMP, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address =AD7746_REG_VT_DATA_HIGH <<8 | AD7746_VTSETUP_VTMD_EXT_TEMP, },
@@ -158,11 +158,10 @@ static const struct iio_chan_spec ad7746_channels[] = { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT | -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | BIT(IIO_CHAN_INFO_OFFSET), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), .address = AD7746_REG_CAP_DATA_HIGH << 8, }, [CIN1_DIFF] = {
@@ -171,11 +170,10 @@ static const struct iio_chan_spec ad7746_channels[] = { .indexed = 1, .channel = 0, .channel2 = 2, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT | -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | BIT(IIO_CHAN_INFO_OFFSET), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), .address =AD7746_REG_CAP_DATA_HIGH <<8 |AD7746_CAPSETUP_CAPDIFF },
@@ -183,11 +181,10 @@ static const struct iio_chan_spec ad7746_channels[] = { .type = IIO_CAPACITANCE, .indexed = 1, .channel = 1, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT | -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | BIT(IIO_CHAN_INFO_OFFSET), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), .address =AD7746_REG_CAP_DATA_HIGH <<8 | AD7746_CAPSETUP_CIN2, },
@@ -197,11 +194,10 @@ static const struct iio_chan_spec ad7746_channels[] = { .indexed = 1, .channel = 1, .channel2 = 3, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT | -IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE) | BIT(IIO_CHAN_INFO_OFFSET), + .info_mask_shared_by_type =BIT (IIO_CHAN_INFO_CALIBBIAS ) | + BIT(IIO_CHAN_INFO_SCALE), .address =AD7746_REG_CAP_DATA_HIGH <<8 | AD7746_CAPSETUP_CAPDIFF | AD7746_CAPSETUP_CIN2, }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 55/67 staging:iio:gyro:adis16060 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/gyro/adis16060_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/staging/iio/gyro/adis16060_core.c +5 -6
@@ -120,27 +120,26 @@ static const struct iio_chan_spec adis16060_channels[] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_Z, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = ADIS16060_GYRO, }, { .type = IIO_VOLTAGE, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = ADIS16060_AIN1, }, { .type = IIO_VOLTAGE, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = ADIS16060_AIN2, }, { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_OFFSET_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_OFFSET) | BIT(IIO_CHAN_INFO_SCALE), .address = ADIS16060_TEMP_OUT, } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 56/67 staging:iio:gyro:adis16130 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/gyro/adis16130_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/gyro/adis16130_core.c +2 -2
@@ -100,13 +100,13 @@ static const struct iio_chan_spec adis16130_channels[] = { .type = IIO_ANGL_VEL, .modified = 1, .channel2 = IIO_MOD_Z, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = ADIS16130_RATEDATA, }, { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .address = ADIS16130_TEMPDATA, } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 57/67 staging:iio:impedance:ad5933 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/impedance-analyzer/ad5933.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +5 -5
@@ -113,7 +113,7 @@ static const struct iio_chan_spec ad5933_channels[] = { .type = IIO_TEMP, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), .address = AD5933_REG_TEMP_DATA, .scan_type = { .sign = 's',
@@ -125,8 +125,8 @@ static const struct iio_chan_spec ad5933_channels[] = { .indexed = 1, .channel = 0, .extend_name = "real_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), .address = AD5933_REG_REAL_DATA, .scan_index = 0, .scan_type = {
@@ -139,8 +139,8 @@ static const struct iio_chan_spec ad5933_channels[] = { .indexed = 1, .channel = 0, .extend_name = "imag_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | + BIT(IIO_CHAN_INFO_SCALE), .address = AD5933_REG_IMAG_DATA, .scan_index = 1, .scan_type = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 58/67 staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/light/isl29018.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/iio/light/isl29018.c +4 -4
@@ -412,17 +412,17 @@ static const struct iio_chan_spec isl29018_channels[] = { .type = IIO_LIGHT, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | + BIT(IIO_CHAN_INFO_CALIBSCALE), }, { .type = IIO_INTENSITY, .modified = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .channel2 = IIO_MOD_LIGHT_IR, }, {/* Unindexed in current ABI. But perhaps it should be. */ .type = IIO_PROXIMITY, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), } };
Signature · 1 line
1.8.1.4
Re: [PATCH 58/67] staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)
Quoted 24 lines · Jonathan Cameron
The original
info_maskis going away in favour of the broken out versions.Signed-off-by Jonathan Cameron <[email protected]>cc Rhyland Klein <[email protected]>--- drivers/staging/iio/light/isl29018.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/iio/light/isl29018.c +2
-3@@ -412,17 +412,17 @@ static const struct iio_chan_spec isl29018_channels[] = { .type = IIO_LIGHT, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) | + BIT(IIO_CHAN_INFO_CALIBSCALE), }, { .type = IIO_INTENSITY, .modified = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,
drivers/staging/iio/light/isl29018.c static const struct iio_chan_spec isl29018_channels[] = { · line 428
Quoted 10 lines
drivers/staging/iio/light/isl29018.c +2
-1+ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .channel2 = IIO_MOD_LIGHT_IR, }, {/* Unindexed in current ABI. But perhaps it should be. */ .type = IIO_PROXIMITY, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), } };
Signature · 1 line
nvpublic
Jonathan Cameron
maintainerPATCH v2 59/67 staging:iio:light:isl29028 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/light/isl29028.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/light/isl29028.c +5 -5
@@ -391,15 +391,15 @@ static const struct attribute_group isl29108_group = {static const struct iio_chan_spec isl29028_channels[] = { { .type =IIO_LIGHT , - .info_mask =IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | -IIO_CHAN_INFO_SCALE_SEPARATE_BIT , + .info_mask_separate =BIT (IIO_CHAN_INFO_PROCESSED ) | +BIT (IIO_CHAN_INFO_SCALE ), }, { .type =IIO_INTENSITY , - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ), }, { .type =IIO_PROXIMITY , - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT , + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_SAMP_FREQ ), } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 60/67 staging:iio:light:tsl2x7x move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-)
drivers/staging/iio/light/tsl2x7x_core.c +20 -20
@@ -1733,14 +1733,14 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .type = IIO_LIGHT, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_CALIBSCALE ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), .event_mask =TSL2X7X_EVENT_MASK }, { .type = IIO_INTENSITY,
@@ -1757,7 +1757,7 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .type = IIO_PROXIMITY, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .event_mask =TSL2X7X_EVENT_MASK }, },
@@ -1770,25 +1770,25 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .type = IIO_LIGHT, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_CALIBSCALE ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), .event_mask =TSL2X7X_EVENT_MASK }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .type = IIO_PROXIMITY, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), .event_mask =TSL2X7X_EVENT_MASK }, },
@@ -1801,8 +1801,8 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .type = IIO_PROXIMITY, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE), .event_mask =TSL2X7X_EVENT_MASK }, },
@@ -1815,26 +1815,26 @@ static const struct tsl2x7x_chip_info tsl2x7x_chip_info_tbl[] = { .type = IIO_LIGHT, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED), }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | -IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | +BIT (IIO_CHAN_INFO_CALIBSCALE ) | + BIT(IIO_CHAN_INFO_CALIBBIAS), .event_mask =TSL2X7X_EVENT_MASK }, { .type = IIO_INTENSITY, .indexed = 1, .channel = 1, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .type = IIO_PROXIMITY, .indexed = 1, .channel = 0, - .info_mask =IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT, + .info_mask_separate =BIT (IIO_CHAN_INFO_RAW ) | + BIT(IIO_CHAN_INFO_CALIBSCALE), .event_mask =TSL2X7X_EVENT_MASK }, },
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 61/67 staging:iio:mag:ak8975 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/magnetometer/ak8975.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/magnetometer/ak8975.c +2 -2
@@ -395,8 +395,8 @@ static int ak8975_read_raw(struct iio_dev *indio_dev, .type = IIO_MAGN, \ .modified = 1, \ .channel2 = IIO_MOD_##axis, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SEPARATE_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ + BIT(IIO_CHAN_INFO_SCALE), \ .address = index, \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 62/67 staging:iio:magnetometer:hmc5843 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/magnetometer/hmc5843.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/magnetometer/hmc5843.c +2 -2
@@ -564,8 +564,8 @@ static int hmc5843_read_raw(struct iio_dev *indio_dev, .type = IIO_MAGN, \ .modified = 1, \ .channel2 = IIO_MOD_##axis, \ - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | \ - IIO_CHAN_INFO_SCALE_SHARED_BIT, \ + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ .address = add \ }
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 63/67 staging:iio:meter:ade7758 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/meter/ade7758_core.c | 60 ++++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-)
drivers/staging/iio/meter/ade7758_core.c +30 -30
@@ -649,8 +649,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 0, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_A, AD7758_VOLTAGE), .scan_index = 0, .scan_type = {
@@ -663,8 +663,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 0, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_A, AD7758_CURRENT), .scan_index = 1, .scan_type = {
@@ -677,8 +677,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 0, .extend_name = "apparent_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_A, AD7758_APP_PWR), .scan_index = 2, .scan_type = {
@@ -691,8 +691,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 0, .extend_name = "active_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_A, AD7758_ACT_PWR), .scan_index = 3, .scan_type = {
@@ -705,8 +705,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 0, .extend_name = "reactive_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_A, AD7758_REACT_PWR), .scan_index = 4, .scan_type = {
@@ -719,8 +719,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 1, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_B, AD7758_VOLTAGE), .scan_index = 5, .scan_type = {
@@ -733,8 +733,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 1, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_B, AD7758_CURRENT), .scan_index = 6, .scan_type = {
@@ -747,8 +747,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 1, .extend_name = "apparent_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_B, AD7758_APP_PWR), .scan_index = 7, .scan_type = {
@@ -761,8 +761,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 1, .extend_name = "active_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_B, AD7758_ACT_PWR), .scan_index = 8, .scan_type = {
@@ -775,8 +775,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 1, .extend_name = "reactive_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_B, AD7758_REACT_PWR), .scan_index = 9, .scan_type = {
@@ -789,8 +789,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 2, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_C, AD7758_VOLTAGE), .scan_index = 10, .scan_type = {
@@ -803,8 +803,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 2, .extend_name = "raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_C, AD7758_CURRENT), .scan_index = 11, .scan_type = {
@@ -817,8 +817,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 2, .extend_name = "apparent_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_C, AD7758_APP_PWR), .scan_index = 12, .scan_type = {
@@ -831,8 +831,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 2, .extend_name = "active_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_C, AD7758_ACT_PWR), .scan_index = 13, .scan_type = {
@@ -845,8 +845,8 @@ static const struct iio_chan_spec ade7758_channels[] = { .indexed = 1, .channel = 2, .extend_name = "reactive_raw", - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | - IIO_CHAN_INFO_SCALE_SHARED_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), .address = AD7758_WT(AD7758_PHASE_C, AD7758_REACT_PWR), .scan_index = 14, .scan_type = {
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 64/67 staging:iio:resolver:ad2s1200 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/resolver/ad2s1200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/resolver/ad2s1200.c +2 -2
@@ -85,12 +85,12 @@ static const struct iio_chan_spec ad2s1200_channels[] = { .type = IIO_ANGL, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .type = IIO_ANGL_VEL, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 65/67 staging:iio:resolver:ad2s1210 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/resolver/ad2s1210.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/resolver/ad2s1210.c +2 -2
@@ -577,12 +577,12 @@ static const struct iio_chan_spec ad2s1210_channels[] = { .type = IIO_ANGL, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), }, { .type = IIO_ANGL_VEL, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), } };
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 66/67 staging:iio:resolver:ad2s90 move to info_mask_(shared_by_type/separate)
In reply to Jonathan CameronThe original info_mask is going away in favour of the broken out versions.
--- drivers/staging/iio/resolver/ad2s90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/resolver/ad2s90.c +1 -1
@@ -55,7 +55,7 @@ static const struct iio_chan_spec ad2s90_chan = { .type = IIO_ANGL, .indexed = 1, .channel = 0, - .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), };static int ad2s90_probe (struct spi_device *spi)
Signature · 1 line
1.8.1.4
Jonathan Cameron
maintainerPATCH v2 67/67 iio:core drop info_mask from struct iio_info
In reply to Jonathan CameronThis has been replaced by the pair of masks info_mask_separate and info_mask_shared_by_type. Other variants may follow.
--- drivers/iio/industrialio-core.c | 17 ---------- include/linux/iio/iio.h | 73 +---------------------------------------- 2 files changed, 1 insertion(+), 89 deletions(-)
drivers/iio/industrialio-core.c +0 -17
@@ -691,23 +691,6 @@ static int iio_device_add_channel_sysfs(struct iio_dev *indio_dev,if (chan->channel <0 )return 0 ; -for_each_set_bit (i, &chan->info_mask,sizeof (long )*8 ) { - ret =__iio_add_chan_devattr (iio_chan_info_postfix[i/2 ], - chan, - &iio_read_channel_info, - &iio_write_channel_info, - i/2 , - !(i%2 ), - &indio_dev->dev, - &indio_dev->channel_attr_list); -if (ret == -EBUSY && (i%2 ==0 )) { - ret =0 ; -continue ; - } -if (ret <0 ) - goto error_ret; - attrcount++; - }for_each_set_bit (i, &chan->info_mask_separate,sizeof (long )*8 ) { ret = __iio_add_chan_devattr(iio_chan_info_postfix[i], chan,
include/linux/iio/iio.h +1 -72
85 lines not on this page · raw message
Signature · 1 line
1.8.1.4
Quoted 15 lines · Jonathan Cameron
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.
Quoted 1 line
Well that was an 'interesting' way to start off this cycle :(
Hi Jonathan,
Looks good on a first glimpse. Can you push this to a branch on your repo? Makes testing things easier.
Thanks,
- Lars
Quoted 198 lines
Version 1 message:
Hi All,
This has been on my todo list for a while. I'm not sure how we ever ended up with the mess that is the current
info_maskbitmap of which properties exist for a given channel. Anyhow currently you have two types of bit in there,IIO_CHAN_INFO_SHARED_BIT(even) andIIO_CHAN_INFO_SEPARATE_BIT(odd). Whether we have odd or even elements is used to indicate whether we want an associated attribute specific to the channel, or one that is shared. E.g.
in_accel_x_scale(for just the x accel channel)
orin_accel_scale(for all accel channels)
in_illuminance0_calibbias
orin_illuminance_calibbiasThis led to a horrible mess in
iio.hwhere we had macros for each option of every element added to theinfo_mask. Also, a while back it became apparent that sometimes we have attributes shared across all channels irrespective of their type (sampling_frequencyfor example). Now the obvious solution to this would be to add a third type ofinfo_maskelement, but then things are getting rather silly.Hence the proposed solution. Have separate
info_maskelements for each of the two types of bit we had previously (others may follow).Advantages:
1) More consise naming of elements
2) Drop all those hideous macros
3) More space (admitedly there are lots of other ways we could have gotten that).Can't immediately think of any disadvantages other than the fact that we now have so many drivers this was rather time consuming to actually put together and almost certainly has some errors somewhere.
Jonathan
Jonathan Cameron (67):
iio: Add broken outinfo_maskfields forshared_by_typeand separate iio:adc:max1363 move toinfo_mask_(shared_by_type/separate)staging:iio:dummy move toinfo_mask_(shared_by_type/separate)iio:hid_sensors move toinfo_mask_(shared_by_type/separate)iio:accel:kxsd9 move toinfo_mask_(shared_by_type/separate)iio:st_sensors move toinfo_mask_(shared_by_type/separate)iio:adc:ad_sigma_delta move toinfo_mask_(shared_by_type/separate)iio:adc:ad7266 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7298 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7476 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7887 move toinfo_mask_(shared_by_type/separate)iio:adc:at91_adc move toinfo_mask_(shared_by_type/separate)iio:adc:lp8778_adc move toinfo_mask_(shared_by_type/separate)iio:adc:ti-adc081 move toinfo_mask_(shared_by_type/separate)iio:adc:ti_am335x_adc move toinfo_mask_(shared_by_type/separate)iio:adc:viperboard_adc move toinfo_mask_(shared_by_type/separate)iio:amplifiers:ad8366 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5064 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5360 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5380 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5421 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5446 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5449 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5504 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5624r move toinfo_mask_(shared_by_type/separate)iio:dac:ad5686 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5755 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5764 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5791 move toinfo_mask_(shared_by_type/separate)iio:dac:max517 move toinfo_mask_(shared_by_type/separate)iio:dac:mcp4725 move toinfo_mask_(shared_by_type/separate)iio:freq:ad9523 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16080 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16136 move toinfo_mask_(shared_by_type/separate)iio:gyro:adxrs450 move toinfo_mask_(shared_by_type/separate)iio:gyro:itg3200_core move toinfo_mask_(shared_by_type/separate)iio:imu:adis16400 move toinfo_mask_(shared_by_type/separate)iio:imu:adis16480 move toinfo_mask_(shared_by_type/separate)iio:imu:mpu6050 move toinfo_mask_(shared_by_type/separate)iio:light:adjd_s311 move toinfo_mask_(shared_by_type/separate)iio:light:lm3533 move toinfo_mask_(shared_by_type/separate)iio:light:tsl2563 move toinfo_mask_(shared_by_type/separate)iio:light:vcnl4000 move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis16220 move to
info_mask_(shared_by_type/separate)
staging:iio:accel:lis3l02dq move to
info_mask_(shared_by_type/separate)
staging:iio:accel:sca3000 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7280a move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7291 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7606 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad799x move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7150 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7152 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7746 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16060 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16130 move toinfo_mask_(shared_by_type/separate)staging:iio:impedance:ad5933 move to
info_mask_(shared_by_type/separate)
staging:iio:light:isl29018 move toinfo_mask_(shared_by_type/separate)staging:iio:light:isl29028 move toinfo_mask_(shared_by_type/separate)staging:iio:light:tsl2x7x move toinfo_mask_(shared_by_type/separate)staging:iio:mag:ak8975 move toinfo_mask_(shared_by_type/separate)staging:iio:magnetometer:hmc5843 move to
info_mask_(shared_by_type/separate)
staging:iio:meter:ade7758 move toinfo_mask_(shared_by_type/separate)staging:iio:resolver:ad2s1200 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s1210 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s90 move to
info_mask_(shared_by_type/separate)
iio:core dropinfo_maskfrom structiio_infodrivers/iio/accel/hid-sensor-accel-3d.c | 24 ++++---- drivers/iio/accel/kxsd9.c | 6 +- drivers/iio/adc/ad7266.c | 12 ++-- drivers/iio/adc/ad7298.c | 10 ++-- drivers/iio/adc/ad7476.c | 10 ++-- drivers/iio/adc/ad7887.c | 8 +-- drivers/iio/adc/at91_adc.c | 4 +- drivers/iio/adc/lp8788_adc.c | 4 +- drivers/iio/adc/max1363.c | 9 +-- drivers/iio/adc/ti-adc081c.c | 4 +- drivers/iio/adc/ti_am335x_adc.c | 2 +- drivers/iio/adc/viperboard_adc.c | 2 +- drivers/iio/amplifiers/ad8366.c | 2 +- drivers/iio/dac/ad5064.c | 4 +- drivers/iio/dac/ad5360.c | 10 ++-- drivers/iio/dac/ad5380.c | 8 +-- drivers/iio/dac/ad5421.c | 10 ++-- drivers/iio/dac/ad5446.c | 4 +- drivers/iio/dac/ad5449.c | 4 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 4 +- drivers/iio/dac/ad5686.c | 6 +- drivers/iio/dac/ad5755.c | 10 ++-- drivers/iio/dac/ad5764.c | 10 ++-- drivers/iio/dac/ad5791.c | 6 +- drivers/iio/dac/max517.c | 4 +- drivers/iio/dac/mcp4725.c | 4 +- drivers/iio/frequency/ad9523.c | 8 +-- drivers/iio/gyro/adis16080.c | 22 +++---- drivers/iio/gyro/adis16136.c | 13 ++-- drivers/iio/gyro/adxrs450.c | 22 +++---- drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++---- drivers/iio/gyro/itg3200_core.c | 13 ++-- drivers/iio/imu/adis16400_core.c | 47 +++++++-------- drivers/iio/imu/adis16480.c | 32 +++++----- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 ++-- drivers/iio/industrialio-core.c | 27 ++++++--- drivers/iio/light/adjd_s311.c | 4 +- drivers/iio/light/hid-sensor-als.c | 8 +-- drivers/iio/light/lm3533-als.c | 6 +- drivers/iio/light/tsl2563.c | 10 ++-- drivers/iio/light/vcnl4000.c | 6 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 24 ++++---- drivers/staging/iio/accel/adis16201_core.c | 8 +-- drivers/staging/iio/accel/adis16203_core.c | 2 +- drivers/staging/iio/accel/adis16204_core.c | 8 +-- drivers/staging/iio/accel/adis16209_core.c | 4 +- drivers/staging/iio/accel/adis16220_core.c | 26 ++++---- drivers/staging/iio/accel/adis16240_core.c | 9 +-- drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++-- drivers/staging/iio/accel/sca3000_core.c | 5 +- drivers/staging/iio/adc/ad7280a.c | 12 ++-- drivers/staging/iio/adc/ad7291.c | 10 ++-- drivers/staging/iio/adc/ad7606_core.c | 4 +- drivers/staging/iio/adc/ad799x_core.c | 76 ++++++++++++------------ drivers/staging/iio/cdc/ad7150.c | 8 +-- drivers/staging/iio/cdc/ad7152.c | 32 +++++----- drivers/staging/iio/cdc/ad7746.c | 48 +++++++-------- drivers/staging/iio/gyro/adis16060_core.c | 11 ++-- drivers/staging/iio/gyro/adis16130_core.c | 4 +- drivers/staging/iio/gyro/adis16260_core.c | 4 +- drivers/staging/iio/iio_simple_dummy.c | 33 +++++------ drivers/staging/iio/impedance-analyzer/ad5933.c | 10 ++-- drivers/staging/iio/light/isl29018.c | 8 +-- drivers/staging/iio/light/isl29028.c | 10 ++-- drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++------- drivers/staging/iio/magnetometer/ak8975.c | 4 +- drivers/staging/iio/magnetometer/hmc5843.c | 4 +- drivers/staging/iio/meter/ade7758_core.c | 60 +++++++++---------- drivers/staging/iio/resolver/ad2s1200.c | 4 +- drivers/staging/iio/resolver/ad2s1210.c | 4 +- drivers/staging/iio/resolver/ad2s90.c | 2 +- include/linux/iio/adc/ad_sigma_delta.h | 6 +- include/linux/iio/common/st_sensors.h | 5 +- include/linux/iio/iio.h | 79 +++---------------------- include/linux/iio/imu/adis.h | 34 +++++------ 76 files changed, 489 insertions(+), 557 deletions(-)
Quoted 16 lines · Lars-Peter Clausen
Quoted 15 lines · Jonathan Cameron
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.
Quoted 6 lines
Quoted 1 line
Well that was an 'interesting' way to start off this cycle :(
Hi Jonathan,
Looks good on a first glimpse. Can you push this to a branch on your repo? Makes testing things easier.
Away from my dev machine until this evening. Will do so then.
Quoted 209 lines
Thanks,
- LarsQuoted 189 lines
Version 1 message:
Hi All,
This has been on my todo list for a while. I'm not sure how we ever ended up with the mess that is the current
info_maskbitmap of which properties exist for a given channel. Anyhow currently you have two types of bit in there,IIO_CHAN_INFO_SHARED_BIT(even) andIIO_CHAN_INFO_SEPARATE_BIT(odd). Whether we have odd or even elements is used to indicate whether we want an associated attribute specific to the channel, or one that is shared. E.g.
in_accel_x_scale(for just the x accel channel)
orin_accel_scale(for all accel channels)
in_illuminance0_calibbias
orin_illuminance_calibbiasThis led to a horrible mess in
iio.hwhere we had macros for each option of every element added to theinfo_mask. Also, a while back it became apparent that sometimes we have attributes shared across all channels irrespective of their type (sampling_frequencyfor example). Now the obvious solution to this would be to add a third type ofinfo_maskelement, but then things are getting rather silly.Hence the proposed solution. Have separate
info_maskelements for each of the two types of bit we had previously (others may follow).Advantages:
1) More consise naming of elements
2) Drop all those hideous macros
3) More space (admitedly there are lots of other ways we could have gotten that).Can't immediately think of any disadvantages other than the fact that we now have so many drivers this was rather time consuming to actually put together and almost certainly has some errors somewhere.
Jonathan
Jonathan Cameron (67):
iio: Add broken outinfo_maskfields forshared_by_typeand separate iio:adc:max1363 move toinfo_mask_(shared_by_type/separate)staging:iio:dummy move toinfo_mask_(shared_by_type/separate)iio:hid_sensors move toinfo_mask_(shared_by_type/separate)iio:accel:kxsd9 move toinfo_mask_(shared_by_type/separate)iio:st_sensors move toinfo_mask_(shared_by_type/separate)iio:adc:ad_sigma_delta move toinfo_mask_(shared_by_type/separate)iio:adc:ad7266 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7298 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7476 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7887 move toinfo_mask_(shared_by_type/separate)iio:adc:at91_adc move toinfo_mask_(shared_by_type/separate)iio:adc:lp8778_adc move toinfo_mask_(shared_by_type/separate)iio:adc:ti-adc081 move toinfo_mask_(shared_by_type/separate)iio:adc:ti_am335x_adc move toinfo_mask_(shared_by_type/separate)iio:adc:viperboard_adc move toinfo_mask_(shared_by_type/separate)iio:amplifiers:ad8366 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5064 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5360 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5380 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5421 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5446 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5449 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5504 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5624r move toinfo_mask_(shared_by_type/separate)iio:dac:ad5686 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5755 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5764 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5791 move toinfo_mask_(shared_by_type/separate)iio:dac:max517 move toinfo_mask_(shared_by_type/separate)iio:dac:mcp4725 move toinfo_mask_(shared_by_type/separate)iio:freq:ad9523 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16080 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16136 move toinfo_mask_(shared_by_type/separate)iio:gyro:adxrs450 move toinfo_mask_(shared_by_type/separate)iio:gyro:itg3200_core move toinfo_mask_(shared_by_type/separate)iio:imu:adis16400 move toinfo_mask_(shared_by_type/separate)iio:imu:adis16480 move toinfo_mask_(shared_by_type/separate)iio:imu:mpu6050 move toinfo_mask_(shared_by_type/separate)iio:light:adjd_s311 move toinfo_mask_(shared_by_type/separate)iio:light:lm3533 move toinfo_mask_(shared_by_type/separate)iio:light:tsl2563 move toinfo_mask_(shared_by_type/separate)iio:light:vcnl4000 move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis16220 move to
info_mask_(shared_by_type/separate)
staging:iio:accel:lis3l02dq move to
info_mask_(shared_by_type/separate)
staging:iio:accel:sca3000 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7280a move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7291 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7606 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad799x move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7150 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7152 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7746 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16060 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16130 move toinfo_mask_(shared_by_type/separate)staging:iio:impedance:ad5933 move to
info_mask_(shared_by_type/separate)
staging:iio:light:isl29018 move toinfo_mask_(shared_by_type/separate)staging:iio:light:isl29028 move toinfo_mask_(shared_by_type/separate)staging:iio:light:tsl2x7x move toinfo_mask_(shared_by_type/separate)staging:iio:mag:ak8975 move toinfo_mask_(shared_by_type/separate)staging:iio:magnetometer:hmc5843 move to
info_mask_(shared_by_type/separate)
staging:iio:meter:ade7758 move toinfo_mask_(shared_by_type/separate)staging:iio:resolver:ad2s1200 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s1210 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s90 move to
info_mask_(shared_by_type/separate)
iio:core dropinfo_maskfrom structiio_infodrivers/iio/accel/hid-sensor-accel-3d.c | 24 ++++---- drivers/iio/accel/kxsd9.c | 6 +- drivers/iio/adc/ad7266.c | 12 ++-- drivers/iio/adc/ad7298.c | 10 ++-- drivers/iio/adc/ad7476.c | 10 ++-- drivers/iio/adc/ad7887.c | 8 +-- drivers/iio/adc/at91_adc.c | 4 +- drivers/iio/adc/lp8788_adc.c | 4 +- drivers/iio/adc/max1363.c | 9 +-- drivers/iio/adc/ti-adc081c.c | 4 +- drivers/iio/adc/ti_am335x_adc.c | 2 +- drivers/iio/adc/viperboard_adc.c | 2 +- drivers/iio/amplifiers/ad8366.c | 2 +- drivers/iio/dac/ad5064.c | 4 +- drivers/iio/dac/ad5360.c | 10 ++-- drivers/iio/dac/ad5380.c | 8 +-- drivers/iio/dac/ad5421.c | 10 ++-- drivers/iio/dac/ad5446.c | 4 +- drivers/iio/dac/ad5449.c | 4 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 4 +- drivers/iio/dac/ad5686.c | 6 +- drivers/iio/dac/ad5755.c | 10 ++-- drivers/iio/dac/ad5764.c | 10 ++-- drivers/iio/dac/ad5791.c | 6 +- drivers/iio/dac/max517.c | 4 +- drivers/iio/dac/mcp4725.c | 4 +- drivers/iio/frequency/ad9523.c | 8 +-- drivers/iio/gyro/adis16080.c | 22 +++---- drivers/iio/gyro/adis16136.c | 13 ++-- drivers/iio/gyro/adxrs450.c | 22 +++---- drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++---- drivers/iio/gyro/itg3200_core.c | 13 ++-- drivers/iio/imu/adis16400_core.c | 47 +++++++-------- drivers/iio/imu/adis16480.c | 32 +++++----- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 ++-- drivers/iio/industrialio-core.c | 27 ++++++--- drivers/iio/light/adjd_s311.c | 4 +- drivers/iio/light/hid-sensor-als.c | 8 +-- drivers/iio/light/lm3533-als.c | 6 +- drivers/iio/light/tsl2563.c | 10 ++-- drivers/iio/light/vcnl4000.c | 6 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 24 ++++---- drivers/staging/iio/accel/adis16201_core.c | 8 +-- drivers/staging/iio/accel/adis16203_core.c | 2 +- drivers/staging/iio/accel/adis16204_core.c | 8 +-- drivers/staging/iio/accel/adis16209_core.c | 4 +- drivers/staging/iio/accel/adis16220_core.c | 26 ++++---- drivers/staging/iio/accel/adis16240_core.c | 9 +-- drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++-- drivers/staging/iio/accel/sca3000_core.c | 5 +- drivers/staging/iio/adc/ad7280a.c | 12 ++-- drivers/staging/iio/adc/ad7291.c | 10 ++-- drivers/staging/iio/adc/ad7606_core.c | 4 +- drivers/staging/iio/adc/ad799x_core.c | 76 ++++++++++++------------ drivers/staging/iio/cdc/ad7150.c | 8 +-- drivers/staging/iio/cdc/ad7152.c | 32 +++++----- drivers/staging/iio/cdc/ad7746.c | 48 +++++++-------- drivers/staging/iio/gyro/adis16060_core.c | 11 ++-- drivers/staging/iio/gyro/adis16130_core.c | 4 +- drivers/staging/iio/gyro/adis16260_core.c | 4 +- drivers/staging/iio/iio_simple_dummy.c | 33 +++++------ drivers/staging/iio/impedance-analyzer/ad5933.c | 10 ++-- drivers/staging/iio/light/isl29018.c | 8 +-- drivers/staging/iio/light/isl29028.c | 10 ++-- drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++------- drivers/staging/iio/magnetometer/ak8975.c | 4 +- drivers/staging/iio/magnetometer/hmc5843.c | 4 +- drivers/staging/iio/meter/ade7758_core.c | 60 +++++++++----------Quoted 9 lines
drivers/staging/iio/resolver/ad2s1200.c | 4 +- drivers/staging/iio/resolver/ad2s1210.c | 4 +- drivers/staging/iio/resolver/ad2s90.c | 2 +- include/linux/iio/adc/ad_sigma_delta.h | 6 +- include/linux/iio/common/st_sensors.h | 5 +- include/linux/iio/iio.h | 79 +++---------------------- include/linux/iio/imu/adis.h | 34 +++++------ 76 files changed, 489 insertions(+), 557 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jonathan Cameron
maintainerQuoted 17 lines · Jonathan Cameron
Quoted 16 lines · Lars-Peter Clausen
Quoted 15 lines · Jonathan Cameron
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.
Quoted 7 lines
Quoted 6 lines
Quoted 1 line
Well that was an 'interesting' way to start off this cycle :(
Hi Jonathan,
Looks good on a first glimpse. Can you push this to a branch on your repo? Makes testing things easier.
Away from my dev machine until this evening. Will do so then.
When it gets through from the backend these (and the extra couple in the other series) will be available in a branch of iio.git called info_mask_split
Jonathan
Quoted 20 lines · Jonathan Cameron
Quoted 19 lines · Jonathan Cameron
Quoted 18 lines · Lars-Peter Clausen
Quoted 16 lines · Jonathan Cameron
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.Well that was an 'interesting' way to start off this cycle :(
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Hi Jonathan,
Looks good on a first glimpse. Can you push this to a branch on your repo? Makes testing things easier.
Away from my dev machine until this evening. Will do so then.
When it gets through from the backend these (and the extra couple in the other series) will be available in a branch of iio.git called
info_mask_split
Ok, except for that one glitch (which I'll assume you put in to see whether I'd find it ;)) the series looks good.
Feel free to add my Acked-by: Lars-Peter Clausen <[email protected]> where you think it is necessary.
And it seems as if you missed these three drivers:
drivers/staging/iio/adc/spear_adc.c drivers/staging/iio/adc/mxs-lradc.c drivers/staging/iio/adc/lpc32xx_adc.c
- Lars
Jonathan Cameron
maintainerWhole series (and the two catching missed drivers) applied to togreg branch of iio.git
Quoted 214 lines · Jonathan Cameron
As Lars-Peter noticed, I was being an idiot and the original set would never have worked. Actually it turned out that they would have also gotten the handling of shared and separate the wrong way around and there were a few other minor issues elsewhere.
Now a lot of people were kind enough to take a look at the original patches and provide Acks on the mistaken assumption that the basic principle worked. (given the cc list would have been huge many people probably never saw anything other than the individual driver patches which in of themselves appeared sane).
If people do not reply this time around I'll assume their acks are good for this set and apply them. (Of course if anyone want so re ack the corrected patches that is great as well!). Any tested-by's would also be great as right now I've only actually tested with one driver.Well that was an 'interesting' way to start off this cycle :(
Version 1 message:
Hi All,
This has been on my todo list for a while. I'm not sure how we ever ended up with the mess that is the current
info_maskbitmap of which properties exist for a given channel. Anyhow currently you have two types of bit in there,IIO_CHAN_INFO_SHARED_BIT(even) andIIO_CHAN_INFO_SEPARATE_BIT(odd). Whether we have odd or even elements is used to indicate whether we want an associated attribute specific to the channel, or one that is shared. E.g.
in_accel_x_scale(for just the x accel channel)
orin_accel_scale(for all accel channels)
in_illuminance0_calibbias
orin_illuminance_calibbiasThis led to a horrible mess in
iio.hwhere we had macros for each option of every element added to theinfo_mask. Also, a while back it became apparent that sometimes we have attributes shared across all channels irrespective of their type (sampling_frequencyfor example). Now the obvious solution to this would be to add a third type ofinfo_maskelement, but then things are getting rather silly.Hence the proposed solution. Have separate
info_maskelements for each of the two types of bit we had previously (others may follow).Advantages:
1) More consise naming of elements
2) Drop all those hideous macros
3) More space (admitedly there are lots of other ways we could have gotten that).Can't immediately think of any disadvantages other than the fact that we now have so many drivers this was rather time consuming to actually put together and almost certainly has some errors somewhere.
Jonathan
Jonathan Cameron (67):
iio: Add broken outinfo_maskfields forshared_by_typeand separate iio:adc:max1363 move toinfo_mask_(shared_by_type/separate)staging:iio:dummy move toinfo_mask_(shared_by_type/separate)iio:hid_sensors move toinfo_mask_(shared_by_type/separate)iio:accel:kxsd9 move toinfo_mask_(shared_by_type/separate)iio:st_sensors move toinfo_mask_(shared_by_type/separate)iio:adc:ad_sigma_delta move toinfo_mask_(shared_by_type/separate)iio:adc:ad7266 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7298 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7476 move toinfo_mask_(shared_by_type/separate)iio:adc:ad7887 move toinfo_mask_(shared_by_type/separate)iio:adc:at91_adc move toinfo_mask_(shared_by_type/separate)iio:adc:lp8778_adc move toinfo_mask_(shared_by_type/separate)iio:adc:ti-adc081 move toinfo_mask_(shared_by_type/separate)iio:adc:ti_am335x_adc move toinfo_mask_(shared_by_type/separate)iio:adc:viperboard_adc move toinfo_mask_(shared_by_type/separate)iio:amplifiers:ad8366 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5064 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5360 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5380 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5421 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5446 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5449 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5504 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5624r move toinfo_mask_(shared_by_type/separate)iio:dac:ad5686 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5755 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5764 move toinfo_mask_(shared_by_type/separate)iio:dac:ad5791 move toinfo_mask_(shared_by_type/separate)iio:dac:max517 move toinfo_mask_(shared_by_type/separate)iio:dac:mcp4725 move toinfo_mask_(shared_by_type/separate)iio:freq:ad9523 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16080 move toinfo_mask_(shared_by_type/separate)iio:gyro:adis16136 move toinfo_mask_(shared_by_type/separate)iio:gyro:adxrs450 move toinfo_mask_(shared_by_type/separate)iio:gyro:itg3200_core move toinfo_mask_(shared_by_type/separate)iio:imu:adis16400 move toinfo_mask_(shared_by_type/separate)iio:imu:adis16480 move toinfo_mask_(shared_by_type/separate)iio:imu:mpu6050 move toinfo_mask_(shared_by_type/separate)iio:light:adjd_s311 move toinfo_mask_(shared_by_type/separate)iio:light:lm3533 move toinfo_mask_(shared_by_type/separate)iio:light:tsl2563 move toinfo_mask_(shared_by_type/separate)iio:light:vcnl4000 move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis move toinfo_mask_(shared_by_type/separate)staging:iio:accel:adis16220 move to
info_mask_(shared_by_type/separate)
staging:iio:accel:lis3l02dq move to
info_mask_(shared_by_type/separate)
staging:iio:accel:sca3000 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7280a move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7291 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad7606 move toinfo_mask_(shared_by_type/separate)staging:iio:adc:ad799x move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7150 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7152 move toinfo_mask_(shared_by_type/separate)staging:iio:cdc:ad7746 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16060 move toinfo_mask_(shared_by_type/separate)staging:iio:gyro:adis16130 move toinfo_mask_(shared_by_type/separate)staging:iio:impedance:ad5933 move to
info_mask_(shared_by_type/separate)
staging:iio:light:isl29018 move toinfo_mask_(shared_by_type/separate)staging:iio:light:isl29028 move toinfo_mask_(shared_by_type/separate)staging:iio:light:tsl2x7x move toinfo_mask_(shared_by_type/separate)staging:iio:mag:ak8975 move toinfo_mask_(shared_by_type/separate)staging:iio:magnetometer:hmc5843 move to
info_mask_(shared_by_type/separate)
staging:iio:meter:ade7758 move toinfo_mask_(shared_by_type/separate)staging:iio:resolver:ad2s1200 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s1210 move to
info_mask_(shared_by_type/separate)
staging:iio:resolver:ad2s90 move to
info_mask_(shared_by_type/separate)
iio:core dropinfo_maskfrom structiio_infodrivers/iio/accel/hid-sensor-accel-3d.c | 24 ++++---- drivers/iio/accel/kxsd9.c | 6 +- drivers/iio/adc/ad7266.c | 12 ++-- drivers/iio/adc/ad7298.c | 10 ++-- drivers/iio/adc/ad7476.c | 10 ++-- drivers/iio/adc/ad7887.c | 8 +-- drivers/iio/adc/at91_adc.c | 4 +- drivers/iio/adc/lp8788_adc.c | 4 +- drivers/iio/adc/max1363.c | 9 +-- drivers/iio/adc/ti-adc081c.c | 4 +- drivers/iio/adc/ti_am335x_adc.c | 2 +- drivers/iio/adc/viperboard_adc.c | 2 +- drivers/iio/amplifiers/ad8366.c | 2 +- drivers/iio/dac/ad5064.c | 4 +- drivers/iio/dac/ad5360.c | 10 ++-- drivers/iio/dac/ad5380.c | 8 +-- drivers/iio/dac/ad5421.c | 10 ++-- drivers/iio/dac/ad5446.c | 4 +- drivers/iio/dac/ad5449.c | 4 +- drivers/iio/dac/ad5504.c | 4 +- drivers/iio/dac/ad5624r_spi.c | 4 +- drivers/iio/dac/ad5686.c | 6 +- drivers/iio/dac/ad5755.c | 10 ++-- drivers/iio/dac/ad5764.c | 10 ++-- drivers/iio/dac/ad5791.c | 6 +- drivers/iio/dac/max517.c | 4 +- drivers/iio/dac/mcp4725.c | 4 +- drivers/iio/frequency/ad9523.c | 8 +-- drivers/iio/gyro/adis16080.c | 22 +++---- drivers/iio/gyro/adis16136.c | 13 ++-- drivers/iio/gyro/adxrs450.c | 22 +++---- drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++---- drivers/iio/gyro/itg3200_core.c | 13 ++-- drivers/iio/imu/adis16400_core.c | 47 +++++++-------- drivers/iio/imu/adis16480.c | 32 +++++----- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 ++-- drivers/iio/industrialio-core.c | 27 ++++++--- drivers/iio/light/adjd_s311.c | 4 +- drivers/iio/light/hid-sensor-als.c | 8 +-- drivers/iio/light/lm3533-als.c | 6 +- drivers/iio/light/tsl2563.c | 10 ++-- drivers/iio/light/vcnl4000.c | 6 +- drivers/iio/magnetometer/hid-sensor-magn-3d.c | 24 ++++---- drivers/staging/iio/accel/adis16201_core.c | 8 +-- drivers/staging/iio/accel/adis16203_core.c | 2 +- drivers/staging/iio/accel/adis16204_core.c | 8 +-- drivers/staging/iio/accel/adis16209_core.c | 4 +- drivers/staging/iio/accel/adis16220_core.c | 26 ++++---- drivers/staging/iio/accel/adis16240_core.c | 9 +-- drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++-- drivers/staging/iio/accel/sca3000_core.c | 5 +- drivers/staging/iio/adc/ad7280a.c | 12 ++-- drivers/staging/iio/adc/ad7291.c | 10 ++-- drivers/staging/iio/adc/ad7606_core.c | 4 +- drivers/staging/iio/adc/ad799x_core.c | 76 ++++++++++++------------ drivers/staging/iio/cdc/ad7150.c | 8 +-- drivers/staging/iio/cdc/ad7152.c | 32 +++++----- drivers/staging/iio/cdc/ad7746.c | 48 +++++++-------- drivers/staging/iio/gyro/adis16060_core.c | 11 ++-- drivers/staging/iio/gyro/adis16130_core.c | 4 +- drivers/staging/iio/gyro/adis16260_core.c | 4 +- drivers/staging/iio/iio_simple_dummy.c | 33 +++++------ drivers/staging/iio/impedance-analyzer/ad5933.c | 10 ++-- drivers/staging/iio/light/isl29018.c | 8 +-- drivers/staging/iio/light/isl29028.c | 10 ++-- drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++------- drivers/staging/iio/magnetometer/ak8975.c | 4 +- drivers/staging/iio/magnetometer/hmc5843.c | 4 +- drivers/staging/iio/meter/ade7758_core.c | 60 +++++++++---------- drivers/staging/iio/resolver/ad2s1200.c | 4 +- drivers/staging/iio/resolver/ad2s1210.c | 4 +- drivers/staging/iio/resolver/ad2s90.c | 2 +- include/linux/iio/adc/ad_sigma_delta.h | 6 +- include/linux/iio/common/st_sensors.h | 5 +- include/linux/iio/iio.h | 79 +++---------------------- include/linux/iio/imu/adis.h | 34 +++++------ 76 files changed, 489 insertions(+), 557 deletions(-)