All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/67 V2] IIO break info_mask into a pair of masks
@ 2013-03-02 16:16 Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 01/67] iio: Add broken out info_mask fields for shared_by_type and separate Jonathan Cameron
                   ` (68 more replies)
  0 siblings, 69 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: 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_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)
or
in_accel_scale (for all accel channels)

in_illuminance0_calibbias
or
in_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(-)

-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 79+ messages in thread

* [PATCH 01/67] iio: Add broken out info_mask fields for shared_by_type and separate
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 02/67] iio:adc:max1363 move to info_mask_(shared_by_type/separate) Jonathan Cameron
                   ` (67 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

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.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/industrialio-core.c | 30 ++++++++++++++++++++++++++++++
 include/linux/iio/iio.h         | 10 +++++++++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 8848f16..6f1a998 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -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;
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index da8c776..7697650 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -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)						\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 02/67] iio:adc:max1363 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 01/67] iio: Add broken out info_mask fields for shared_by_type and separate Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 03/67] staging:iio:dummy " Jonathan Cameron
                   ` (66 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/adc/max1363.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 6c1cfb7..9e6da72 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -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',					\
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 03/67] staging:iio:dummy move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 01/67] iio: Add broken out info_mask fields for shared_by_type and separate Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 02/67] iio:adc:max1363 move to info_mask_(shared_by_type/separate) Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 04/67] iio:hid_sensors " Jonathan Cameron
                   ` (65 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/staging/iio/iio_simple_dummy.c | 33 +++++++++++++++------------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/iio/iio_simple_dummy.c b/drivers/staging/iio/iio_simple_dummy.c
index aee76c7..0193e17 100644
--- a/drivers/staging/iio/iio_simple_dummy.c
+++ b/drivers/staging/iio/iio_simple_dummy.c
@@ -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
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 04/67] iio:hid_sensors move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (2 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 03/67] staging:iio:dummy " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 05/67] iio:accel:kxsd9 " Jonathan Cameron
                   ` (64 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/accel/hid-sensor-accel-3d.c       | 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(-)

diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c
index dd8ea42..bbcbd71 100644
--- a/drivers/iio/accel/hid-sensor-accel-3d.c
+++ b/drivers/iio/accel/hid-sensor-accel-3d.c
@@ -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,
 	}
 };
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c
index fcfc83a..bc943dd 100644
--- a/drivers/iio/gyro/hid-sensor-gyro-3d.c
+++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c
@@ -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,
 	}
 };
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c
index 3d7e8c9..80d68ff 100644
--- a/drivers/iio/light/hid-sensor-als.c
+++ b/drivers/iio/light/hid-sensor-als.c
@@ -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,
 	}
 };
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
index d8d0126..99f4e49 100644
--- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c
+++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c
@@ -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,
 	}
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 05/67] iio:accel:kxsd9 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (3 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 04/67] iio:hid_sensors " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 06/67] iio:st_sensors " Jonathan Cameron
                   ` (63 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/accel/kxsd9.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index c2229a5..7229645 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -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,
 	}
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 06/67] iio:st_sensors move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (4 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 05/67] iio:accel:kxsd9 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 07/67] iio:adc:ad_sigma_delta " Jonathan Cameron
                   ` (62 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Denis Ciocca

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Denis Ciocca <denis.ciocca@st.com>
---
 include/linux/iio/common/st_sensors.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 1f86a97..7c0c0d3 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -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, \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 07/67] iio:adc:ad_sigma_delta move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (5 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 06/67] iio:st_sensors " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 08/67] iio:adc:ad7266 " Jonathan Cameron
                   ` (61 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 include/linux/iio/adc/ad_sigma_delta.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h
index 2e4eab9..e7fdec4 100644
--- a/include/linux/iio/adc/ad_sigma_delta.h
+++ b/include/linux/iio/adc/ad_sigma_delta.h
@@ -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', \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 08/67] iio:adc:ad7266 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (6 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 07/67] iio:adc:ad_sigma_delta " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 09/67] iio:adc:ad7298 " Jonathan Cameron
                   ` (60 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/ad7266.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c
index bbad9b9..c2744a7 100644
--- a/drivers/iio/adc/ad7266.c
+++ b/drivers/iio/adc/ad7266.c
@@ -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,			\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 09/67] iio:adc:ad7298 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (7 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 08/67] iio:adc:ad7266 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 10/67] iio:adc:ad7476 " Jonathan Cameron
                   ` (59 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/ad7298.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
index b34d754..03b7718 100644
--- a/drivers/iio/adc/ad7298.c
+++ b/drivers/iio/adc/ad7298.c
@@ -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 = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 10/67] iio:adc:ad7476 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (8 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 09/67] iio:adc:ad7298 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 11/67] iio:adc:ad7887 " Jonathan Cameron
                   ` (58 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/ad7476.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/adc/ad7476.c b/drivers/iio/adc/ad7476.c
index 1491fa6..2e98bef4 100644
--- a/drivers/iio/adc/ad7476.c
+++ b/drivers/iio/adc/ad7476.c
@@ -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[] = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 11/67] iio:adc:ad7887 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (9 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 10/67] iio:adc:ad7476 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 12/67] iio:adc:at91_adc " Jonathan Cameron
                   ` (57 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/ad7887.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/ad7887.c b/drivers/iio/adc/ad7887.c
index a33d5cd..dd15a5b 100644
--- a/drivers/iio/adc/ad7887.c
+++ b/drivers/iio/adc/ad7887.c
@@ -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),
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 12/67] iio:adc:at91_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (10 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 11/67] iio:adc:ad7887 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-10 10:41   ` Maxime Ripard
  2013-03-02 16:16 ` [PATCH 13/67] iio:adc:lp8778_adc " Jonathan Cameron
                   ` (56 subsequent siblings)
  68 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Maxime Ripard

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/iio/adc/at91_adc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index a526c0e..0516c5e 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -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;
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 13/67] iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (11 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 12/67] iio:adc:at91_adc " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-07  0:49   ` Kim, Milo
  2013-03-02 16:16 ` [PATCH 14/67] iio:adc:ti-adc081 " Jonathan Cameron
                   ` (55 subsequent siblings)
  68 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Milo(Woogyom) Kim

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Milo(Woogyom) Kim <milo.kim@ti.com>
---
 drivers/iio/adc/lp8788_adc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/lp8788_adc.c b/drivers/iio/adc/lp8788_adc.c
index 763f575..62bc39e 100644
--- a/drivers/iio/adc/lp8788_adc.c
+++ b/drivers/iio/adc/lp8788_adc.c
@@ -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,				\
 }
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 14/67] iio:adc:ti-adc081 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (12 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 13/67] iio:adc:lp8778_adc " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 15/67] iio:adc:ti_am335x_adc " Jonathan Cameron
                   ` (54 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Thierry Reding

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Thierry Reding <thierry.reding@avionic-design.de>
---
 drivers/iio/adc/ti-adc081c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c
index f4a46dd..2826faa 100644
--- a/drivers/iio/adc/ti-adc081c.c
+++ b/drivers/iio/adc/ti-adc081c.c
@@ -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 = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 15/67] iio:adc:ti_am335x_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (13 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 14/67] iio:adc:ti-adc081 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 16/67] iio:adc:viperboard_adc " Jonathan Cameron
                   ` (53 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Patil, Rachna

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Patil, Rachna <rachna@ti.com>
---
 drivers/iio/adc/ti_am335x_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index cd030e1..5f9a7e7 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -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;
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 16/67] iio:adc:viperboard_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (14 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 15/67] iio:adc:ti_am335x_adc " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 17/67] iio:amplifiers:ad8366 " Jonathan Cameron
                   ` (52 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars Poeschel

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars Poeschel <poeschel@lemonage.de>
---
 drivers/iio/adc/viperboard_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/viperboard_adc.c b/drivers/iio/adc/viperboard_adc.c
index ad02615..56ac481 100644
--- a/drivers/iio/adc/viperboard_adc.c
+++ b/drivers/iio/adc/viperboard_adc.c
@@ -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',				\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 17/67] iio:amplifiers:ad8366 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (15 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 16/67] iio:adc:viperboard_adc " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 18/67] iio:dac:ad5064 " Jonathan Cameron
                   ` (51 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/iio/amplifiers/ad8366.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/amplifiers/ad8366.c b/drivers/iio/amplifiers/ad8366.c
index d6c0af2..d354554 100644
--- a/drivers/iio/amplifiers/ad8366.c
+++ b/drivers/iio/amplifiers/ad8366.c
@@ -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[] = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 18/67] iio:dac:ad5064 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (16 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 17/67] iio:amplifiers:ad8366 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 19/67] iio:dac:ad5360 " Jonathan Cameron
                   ` (50 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5064.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5064.c b/drivers/iio/dac/ad5064.c
index 2fe1d4e..cbbfef5 100644
--- a/drivers/iio/dac/ad5064.c
+++ b/drivers/iio/dac/ad5064.c
@@ -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,				\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 19/67] iio:dac:ad5360 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (17 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 18/67] iio:dac:ad5064 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 20/67] iio:dac:ad5380 " Jonathan Cameron
                   ` (49 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5360.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/ad5360.c b/drivers/iio/dac/ad5360.c
index 9277121..80923af 100644
--- a/drivers/iio/dac/ad5360.c
+++ b/drivers/iio/dac/ad5360.c
@@ -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))	\
 }
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 20/67] iio:dac:ad5380 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (18 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 19/67] iio:dac:ad5360 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 21/67] iio:dac:ad5421 " Jonathan Cameron
                   ` (48 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5380.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/dac/ad5380.c
index 483fc37..bf2db02 100644
--- a/drivers/iio/dac/ad5380.c
+++ b/drivers/iio/dac/ad5380.c
@@ -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,				\
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 21/67] iio:dac:ad5421 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (19 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 20/67] iio:dac:ad5380 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 22/67] iio:dac:ad5446 " Jonathan Cameron
                   ` (47 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5421.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c
index 6b86a63..98f2440 100644
--- a/drivers/iio/dac/ad5421.c
+++ b/drivers/iio/dac/ad5421.c
@@ -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),
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 22/67] iio:dac:ad5446 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (20 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 21/67] iio:dac:ad5421 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 23/67] iio:dac:ad5449 " Jonathan Cameron
                   ` (46 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5446.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c
index f5583ae..cae8f60 100644
--- a/drivers/iio/dac/ad5446.c
+++ b/drivers/iio/dac/ad5446.c
@@ -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), \
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 23/67] iio:dac:ad5449 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (21 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 22/67] iio:dac:ad5446 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 24/67] iio:dac:ad5504 " Jonathan Cameron
                   ` (45 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5449.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5449.c b/drivers/iio/dac/ad5449.c
index c4731b7..ba1c914 100644
--- a/drivers/iio/dac/ad5449.c
+++ b/drivers/iio/dac/ad5449.c
@@ -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)),	\
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 24/67] iio:dac:ad5504 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (22 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 23/67] iio:dac:ad5449 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 25/67] iio:dac:ad5624r " Jonathan Cameron
                   ` (44 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5504.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c
index e5e5974..139206e 100644
--- a/drivers/iio/dac/ad5504.c
+++ b/drivers/iio/dac/ad5504.c
@@ -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, \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 25/67] iio:dac:ad5624r move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (23 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 24/67] iio:dac:ad5504 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 26/67] iio:dac:ad5686 " Jonathan Cameron
                   ` (43 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5624r_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c
index f6e1166..bb298aa 100644
--- a/drivers/iio/dac/ad5624r_spi.c
+++ b/drivers/iio/dac/ad5624r_spi.c
@@ -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, \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 26/67] iio:dac:ad5686 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (24 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 25/67] iio:dac:ad5624r " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 27/67] iio:dac:ad5755 " Jonathan Cameron
                   ` (42 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5686.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c
index 5e554af..06439b1 100644
--- a/drivers/iio/dac/ad5686.c
+++ b/drivers/iio/dac/ad5686.c
@@ -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,			\
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 27/67] iio:dac:ad5755 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (25 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 26/67] iio:dac:ad5686 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 28/67] iio:dac:ad5764 " Jonathan Cameron
                   ` (41 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5755.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index 71faabc..12bb315 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -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,				\
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 28/67] iio:dac:ad5764 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (26 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 27/67] iio:dac:ad5755 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 29/67] iio:dac:ad5791 " Jonathan Cameron
                   ` (40 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5764.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c
index 5b7acd3..7a53f7d 100644
--- a/drivers/iio/dac/ad5764.c
+++ b/drivers/iio/dac/ad5764.c
@@ -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))	\
 }
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 29/67] iio:dac:ad5791 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (27 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 28/67] iio:dac:ad5764 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 30/67] iio:dac:max517 " Jonathan Cameron
                   ` (39 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/dac/ad5791.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/dac/ad5791.c b/drivers/iio/dac/ad5791.c
index 8dfd3da..97c1e5d 100644
--- a/drivers/iio/dac/ad5791.c
+++ b/drivers/iio/dac/ad5791.c
@@ -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,			\
 }
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 30/67] iio:dac:max517 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (28 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 29/67] iio:dac:ad5791 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 31/67] iio:dac:mcp4725 " Jonathan Cameron
                   ` (38 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Roland Stigge

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Roland Stigge <stigge@antcom.de>
---
 drivers/iio/dac/max517.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c
index 352abe2..ebfaa41 100644
--- a/drivers/iio/dac/max517.c
+++ b/drivers/iio/dac/max517.c
@@ -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),		\
 }
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 31/67] iio:dac:mcp4725 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (29 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 30/67] iio:dac:max517 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 32/67] iio:freq:ad9523 " Jonathan Cameron
                   ` (37 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Peter Meerwald

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/iio/dac/mcp4725.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c
index 8f88cc4..a612ec7 100644
--- a/drivers/iio/dac/mcp4725.c
+++ b/drivers/iio/dac/mcp4725.c
@@ -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),
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 32/67] iio:freq:ad9523 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (30 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 31/67] iio:dac:mcp4725 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 33/67] iio:gyro:adis16080 " Jonathan Cameron
                   ` (36 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/frequency/ad9523.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
index 1ea132e..92276de 100644
--- a/drivers/iio/frequency/ad9523.c
+++ b/drivers/iio/frequency/ad9523.c
@@ -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);
 		}
 	}
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 33/67] iio:gyro:adis16080 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (31 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 32/67] iio:freq:ad9523 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 34/67] iio:gyro:adis16136 " Jonathan Cameron
                   ` (35 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/gyro/adis16080.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/iio/gyro/adis16080.c b/drivers/iio/gyro/adis16080.c
index 1861287..e1bb5f9 100644
--- a/drivers/iio/gyro/adis16080.c
+++ b/drivers/iio/gyro/adis16080.c
@@ -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,
 	}
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 34/67] iio:gyro:adis16136 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (32 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 33/67] iio:gyro:adis16080 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 35/67] iio:gyro:adxrs450 " Jonathan Cameron
                   ` (34 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/gyro/adis16136.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/gyro/adis16136.c b/drivers/iio/gyro/adis16136.c
index 8cb0bcb..058e6d5 100644
--- a/drivers/iio/gyro/adis16136.c
+++ b/drivers/iio/gyro/adis16136.c
@@ -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 = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 35/67] iio:gyro:adxrs450 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (33 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 34/67] iio:gyro:adis16136 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 36/67] iio:gyro:itg3200_core " Jonathan Cameron
                   ` (33 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/gyro/adxrs450.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/iio/gyro/adxrs450.c b/drivers/iio/gyro/adxrs450.c
index 5b79953..8bd72b4 100644
--- a/drivers/iio/gyro/adxrs450.c
+++ b/drivers/iio/gyro/adxrs450.c
@@ -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),
 		}
 	},
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 36/67] iio:gyro:itg3200_core move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (34 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 35/67] iio:gyro:adxrs450 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 37/67] iio:imu:adis16400 " Jonathan Cameron
                   ` (32 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Manuel Stahl

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
---
 drivers/iio/gyro/itg3200_core.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/gyro/itg3200_core.c b/drivers/iio/gyro/itg3200_core.c
index df2e6aa..d66605d2 100644
--- a/drivers/iio/gyro/itg3200_core.c
+++ b/drivers/iio/gyro/itg3200_core.c
@@ -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,
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 37/67] iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (35 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 36/67] iio:gyro:itg3200_core " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-04 18:48   ` Lars-Peter Clausen
  2013-03-02 16:16 ` [PATCH 38/67] iio:imu:adis16480 " Jonathan Cameron
                   ` (31 subsequent siblings)
  68 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 24 deletions(-)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index b7f215e..2111068 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -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),
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 38/67] iio:imu:adis16480 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (36 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 37/67] iio:imu:adis16400 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 39/67] iio:imu:mpu6050 " Jonathan Cameron
                   ` (30 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/imu/adis16480.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
index 8c26a5f..b7db383 100644
--- a/drivers/iio/imu/adis16480.c
+++ b/drivers/iio/imu/adis16480.c
@@ -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 = { \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 39/67] iio:imu:mpu6050 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (37 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 38/67] iio:imu:adis16480 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 40/67] iio:light:adjd_s311 " Jonathan Cameron
                   ` (29 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Ge Gao

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Ge Gao <ggao@invensense.com>
---
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
index 37ca05b..fe4c61e 100644
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -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),
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 40/67] iio:light:adjd_s311 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (38 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 39/67] iio:imu:mpu6050 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 41/67] iio:light:lm3533 " Jonathan Cameron
                   ` (28 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Peter Meerwald

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/iio/light/adjd_s311.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index d5b9d39..5f4749e 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -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), \
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 41/67] iio:light:lm3533 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (39 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 40/67] iio:light:adjd_s311 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:16 ` [PATCH 42/67] iio:light:tsl2563 " Jonathan Cameron
                   ` (27 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Johan Hovold

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Johan Hovold <jhovold@gmail.com>
---
 drivers/iio/light/lm3533-als.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c
index 7503012..5fa31a4 100644
--- a/drivers/iio/light/lm3533-als.c
+++ b/drivers/iio/light/lm3533-als.c
@@ -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),
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 42/67] iio:light:tsl2563 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (40 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 41/67] iio:light:lm3533 " Jonathan Cameron
@ 2013-03-02 16:16 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 43/67] iio:light:vcnl4000 " Jonathan Cameron
                   ` (26 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:16 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Jon Brenner

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Jon Brenner <jbrenner@taosinc.com>
---
 drivers/iio/light/tsl2563.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index fd8be69..1f529f3 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 43/67] iio:light:vcnl4000 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (41 preceding siblings ...)
  2013-03-02 16:16 ` [PATCH 42/67] iio:light:tsl2563 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 44/67] staging:iio:accel:adis " Jonathan Cameron
                   ` (25 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Peter Meerwald

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Peter Meerwald <pmeerw@pmeerw.net>
---
 drivers/iio/light/vcnl4000.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index 2aa748f..1014943 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 44/67] staging:iio:accel:adis move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (42 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 43/67] iio:light:vcnl4000 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 45/67] staging:iio:accel:adis16220 " Jonathan Cameron
                   ` (24 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 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(-)

diff --git a/drivers/staging/iio/accel/adis16201_core.c b/drivers/staging/iio/accel/adis16201_core.c
index 9e5791f..ab8ec7a 100644
--- a/drivers/staging/iio/accel/adis16201_core.c
+++ b/drivers/staging/iio/accel/adis16201_core.c
@@ -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)
 };
 
diff --git a/drivers/staging/iio/accel/adis16203_core.c b/drivers/staging/iio/accel/adis16203_core.c
index 8c23527..b08ac8f 100644
--- a/drivers/staging/iio/accel/adis16203_core.c
+++ b/drivers/staging/iio/accel/adis16203_core.c
@@ -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),
diff --git a/drivers/staging/iio/accel/adis16204_core.c b/drivers/staging/iio/accel/adis16204_core.c
index f359266..792ec25 100644
--- a/drivers/staging/iio/accel/adis16204_core.c
+++ b/drivers/staging/iio/accel/adis16204_core.c
@@ -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),
 };
 
diff --git a/drivers/staging/iio/accel/adis16209_core.c b/drivers/staging/iio/accel/adis16209_core.c
index 69c50ee..323c169 100644
--- a/drivers/staging/iio/accel/adis16209_core.c
+++ b/drivers/staging/iio/accel/adis16209_core.c
@@ -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),
diff --git a/drivers/staging/iio/accel/adis16240_core.c b/drivers/staging/iio/accel/adis16240_core.c
index e97fa0b..fd1f0fd 100644
--- a/drivers/staging/iio/accel/adis16240_core.c
+++ b/drivers/staging/iio/accel/adis16240_core.c
@@ -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)
 };
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c
index 6e80b8c..620d63f 100644
--- a/drivers/staging/iio/gyro/adis16260_core.c
+++ b/drivers/staging/iio/gyro/adis16260_core.c
@@ -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), \
diff --git a/include/linux/iio/imu/adis.h b/include/linux/iio/imu/adis.h
index ff781dc..b665dc7 100644
--- a/include/linux/iio/imu/adis.h
+++ b/include/linux/iio/imu/adis.h
@@ -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
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 45/67] staging:iio:accel:adis16220 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (43 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 44/67] staging:iio:accel:adis " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 46/67] staging:iio:accel:lis3l02dq " Jonathan Cameron
                   ` (23 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/accel/adis16220_core.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/iio/accel/adis16220_core.c b/drivers/staging/iio/accel/adis16220_core.c
index 370b01a..0e72f79 100644
--- a/drivers/staging/iio/accel/adis16220_core.c
+++ b/drivers/staging/iio/accel/adis16220_core.c
@@ -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,
 	}
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 46/67] staging:iio:accel:lis3l02dq move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (44 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 45/67] staging:iio:accel:adis16220 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 47/67] staging:iio:accel:sca3000 " Jonathan Cameron
                   ` (22 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/staging/iio/accel/lis3l02dq_core.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
index 0e01930..1bfe5d8 100644
--- a/drivers/staging/iio/accel/lis3l02dq_core.c
+++ b/drivers/staging/iio/accel/lis3l02dq_core.c
@@ -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 = {					\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 47/67] staging:iio:accel:sca3000 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (45 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 46/67] staging:iio:accel:lis3l02dq " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 48/67] staging:iio:adc:ad7280a " Jonathan Cameron
                   ` (21 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/staging/iio/accel/sca3000_core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c
index 14683f5..32950ad 100644
--- a/drivers/staging/iio/accel/sca3000_core.c
+++ b/drivers/staging/iio/accel/sca3000_core.c
@@ -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 = {					\
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 48/67] staging:iio:adc:ad7280a move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (46 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 47/67] staging:iio:accel:sca3000 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 49/67] staging:iio:adc:ad7291 " Jonathan Cameron
                   ` (20 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/adc/ad7280a.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7280a.c b/drivers/staging/iio/adc/ad7280a.c
index 1f190c1..2fd6ee3 100644
--- a/drivers/staging/iio/adc/ad7280a.c
+++ b/drivers/staging/iio/adc/ad7280a.c
@@ -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;
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 49/67] staging:iio:adc:ad7291 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (47 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 48/67] staging:iio:adc:ad7280a " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 50/67] staging:iio:adc:ad7606 " Jonathan Cameron
                   ` (19 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/adc/ad7291.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7291.c b/drivers/staging/iio/adc/ad7291.c
index 6e58e36..d088c66 100644
--- a/drivers/staging/iio/adc/ad7291.c
+++ b/drivers/staging/iio/adc/ad7291.c
@@ -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 =
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 50/67] staging:iio:adc:ad7606 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (48 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 49/67] staging:iio:adc:ad7291 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 51/67] staging:iio:adc:ad799x " Jonathan Cameron
                   ` (18 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/adc/ad7606_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index bae61cb..d104b43 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -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),		\
 	}
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 51/67] staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (49 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 50/67] staging:iio:adc:ad7606 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 52/67] staging:iio:cdc:ad7150 " Jonathan Cameron
                   ` (17 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/adc/ad799x_core.c | 76 +++++++++++++++++------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c
index 077eedb..40cc89a 100644
--- a/drivers/staging/iio/adc/ad799x_core.c
+++ b/drivers/staging/iio/adc/ad799x_core.c
@@ -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),
 			},
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 52/67] staging:iio:cdc:ad7150 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (50 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 51/67] staging:iio:adc:ad799x " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 53/67] staging:iio:cdc:ad7152 " Jonathan Cameron
                   ` (16 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/cdc/ad7150.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 3c608c1..687dd2c 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -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) |
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 53/67] staging:iio:cdc:ad7152 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (51 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 52/67] staging:iio:cdc:ad7150 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 54/67] staging:iio:cdc:ad7746 " Jonathan Cameron
                   ` (15 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/cdc/ad7152.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c
index 3c92ba3..1d7c528 100644
--- a/drivers/staging/iio/cdc/ad7152.c
+++ b/drivers/staging/iio/cdc/ad7152.c
@@ -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),
 	}
 };
 /*
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 54/67] staging:iio:cdc:ad7746 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (52 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 53/67] staging:iio:cdc:ad7152 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 55/67] staging:iio:gyro:adis16060 " Jonathan Cameron
                   ` (14 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/cdc/ad7746.c | 48 ++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c
index 466b82e..94f9ca7 100644
--- a/drivers/staging/iio/cdc/ad7746.c
+++ b/drivers/staging/iio/cdc/ad7746.c
@@ -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,
 	}
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 55/67] staging:iio:gyro:adis16060 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (53 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 54/67] staging:iio:cdc:ad7746 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 56/67] staging:iio:gyro:adis16130 " Jonathan Cameron
                   ` (13 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/gyro/adis16060_core.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/iio/gyro/adis16060_core.c b/drivers/staging/iio/gyro/adis16060_core.c
index 687c151..c67d3a8 100644
--- a/drivers/staging/iio/gyro/adis16060_core.c
+++ b/drivers/staging/iio/gyro/adis16060_core.c
@@ -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,
 	}
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 56/67] staging:iio:gyro:adis16130 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (54 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 55/67] staging:iio:gyro:adis16060 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 57/67] staging:iio:impedance:ad5933 " Jonathan Cameron
                   ` (12 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/gyro/adis16130_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/gyro/adis16130_core.c b/drivers/staging/iio/gyro/adis16130_core.c
index 835801e..531b803 100644
--- a/drivers/staging/iio/gyro/adis16130_core.c
+++ b/drivers/staging/iio/gyro/adis16130_core.c
@@ -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,
 	}
 };
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 57/67] staging:iio:impedance:ad5933 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (55 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 56/67] staging:iio:gyro:adis16130 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 58/67] staging:iio:light:isl29018 " Jonathan Cameron
                   ` (11 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/impedance-analyzer/ad5933.c b/drivers/staging/iio/impedance-analyzer/ad5933.c
index 440e226..6330af6 100644
--- a/drivers/staging/iio/impedance-analyzer/ad5933.c
+++ b/drivers/staging/iio/impedance-analyzer/ad5933.c
@@ -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 = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 58/67] staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (56 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 57/67] staging:iio:impedance:ad5933 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-04 16:47   ` Rhyland Klein
  2013-03-02 16:17 ` [PATCH 59/67] staging:iio:light:isl29028 " Jonathan Cameron
                   ` (10 subsequent siblings)
  68 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Rhyland Klein

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Rhyland Klein <rklein@nvidia.com>
---
 drivers/staging/iio/light/isl29018.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
index b0adac0..82478a5 100644
--- a/drivers/staging/iio/light/isl29018.c
+++ b/drivers/staging/iio/light/isl29018.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 59/67] staging:iio:light:isl29028 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (57 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 58/67] staging:iio:light:isl29018 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 60/67] staging:iio:light:tsl2x7x " Jonathan Cameron
                   ` (9 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Laxman Dewangan

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/staging/iio/light/isl29028.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c
index e52af77..8bb0d03 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 60/67] staging:iio:light:tsl2x7x move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (58 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 59/67] staging:iio:light:isl29028 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 61/67] staging:iio:mag:ak8975 " Jonathan Cameron
                   ` (8 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Jon Brenner

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Jon Brenner <jon.brenner@ams.com>
---
 drivers/staging/iio/light/tsl2x7x_core.c | 40 ++++++++++++++++----------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c
index a58731e..d060f25 100644
--- a/drivers/staging/iio/light/tsl2x7x_core.c
+++ b/drivers/staging/iio/light/tsl2x7x_core.c
@@ -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
 			},
 		},
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 61/67] staging:iio:mag:ak8975 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (59 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 60/67] staging:iio:light:tsl2x7x " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 62/67] staging:iio:magnetometer:hmc5843 " Jonathan Cameron
                   ` (7 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Andrew Chew

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Andrew Chew <achew@nvidia.com>
---
 drivers/staging/iio/magnetometer/ak8975.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/ak8975.c b/drivers/staging/iio/magnetometer/ak8975.c
index 28f080e..b614da1 100644
--- a/drivers/staging/iio/magnetometer/ak8975.c
+++ b/drivers/staging/iio/magnetometer/ak8975.c
@@ -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,					\
 	}
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 62/67] staging:iio:magnetometer:hmc5843 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (60 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 61/67] staging:iio:mag:ak8975 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 63/67] staging:iio:meter:ade7758 " Jonathan Cameron
                   ` (6 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Shubhrajyoti D

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/staging/iio/magnetometer/hmc5843.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 1a520ec..86c6bf9 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -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						\
 	}
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 63/67] staging:iio:meter:ade7758 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (61 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 62/67] staging:iio:magnetometer:hmc5843 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 64/67] staging:iio:resolver:ad2s1200 " Jonathan Cameron
                   ` (5 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/meter/ade7758_core.c | 60 ++++++++++++++++----------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c
index 53c68dc..8f5bcfa 100644
--- a/drivers/staging/iio/meter/ade7758_core.c
+++ b/drivers/staging/iio/meter/ade7758_core.c
@@ -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 = {
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 64/67] staging:iio:resolver:ad2s1200 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (62 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 63/67] staging:iio:meter:ade7758 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 65/67] staging:iio:resolver:ad2s1210 " Jonathan Cameron
                   ` (4 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/resolver/ad2s1200.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c
index 4fe3499..7122116 100644
--- a/drivers/staging/iio/resolver/ad2s1200.c
+++ b/drivers/staging/iio/resolver/ad2s1200.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 65/67] staging:iio:resolver:ad2s1210 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (63 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 64/67] staging:iio:resolver:ad2s1200 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 66/67] staging:iio:resolver:ad2s90 " Jonathan Cameron
                   ` (3 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/resolver/ad2s1210.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index 53110b6..0d3356d 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -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),
 	}
 };
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 66/67] staging:iio:resolver:ad2s90 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (64 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 65/67] staging:iio:resolver:ad2s1210 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-02 16:17 ` [PATCH 67/67] iio:core drop info_mask from struct iio_info Jonathan Cameron
                   ` (2 subsequent siblings)
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Michael Hennerich

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/staging/iio/resolver/ad2s90.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/resolver/ad2s90.c b/drivers/staging/iio/resolver/ad2s90.c
index 0aecfbc..40b8252 100644
--- a/drivers/staging/iio/resolver/ad2s90.c
+++ b/drivers/staging/iio/resolver/ad2s90.c
@@ -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)
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* [PATCH 67/67] iio:core drop info_mask from struct iio_info
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (65 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 66/67] staging:iio:resolver:ad2s90 " Jonathan Cameron
@ 2013-03-02 16:17 ` Jonathan Cameron
  2013-03-04  9:09 ` [PATCH 00/67 V2] IIO break info_mask into a pair of masks Lars-Peter Clausen
  2013-03-17 19:51 ` Jonathan Cameron
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-02 16:17 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

This has been replaced by the pair of masks info_mask_separate
and info_mask_shared_by_type.  Other variants may follow.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/industrialio-core.c | 17 ----------
 include/linux/iio/iio.h         | 73 +----------------------------------------
 2 files changed, 1 insertion(+), 89 deletions(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 6f1a998..7f09958 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -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,
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 7697650..8d171f4 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -38,76 +38,6 @@ enum iio_chan_info_enum {
 	IIO_CHAN_INFO_HYSTERESIS,
 };
 
-#define IIO_CHAN_INFO_SHARED_BIT(type) BIT(type*2)
-#define IIO_CHAN_INFO_SEPARATE_BIT(type) BIT(type*2 + 1)
-#define IIO_CHAN_INFO_BITS(type) (IIO_CHAN_INFO_SHARED_BIT(type) | \
-				    IIO_CHAN_INFO_SEPARATE_BIT(type))
-
-#define IIO_CHAN_INFO_RAW_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_RAW)
-#define IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PROCESSED)
-#define IIO_CHAN_INFO_SCALE_SEPARATE_BIT		\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SCALE)
-#define IIO_CHAN_INFO_SCALE_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SCALE)
-#define IIO_CHAN_INFO_OFFSET_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_OFFSET)
-#define IIO_CHAN_INFO_OFFSET_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_OFFSET)
-#define IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBSCALE)
-#define IIO_CHAN_INFO_CALIBSCALE_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBSCALE)
-#define IIO_CHAN_INFO_CALIBBIAS_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_CALIBBIAS)
-#define IIO_CHAN_INFO_CALIBBIAS_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_CALIBBIAS)
-#define IIO_CHAN_INFO_PEAK_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAK)
-#define IIO_CHAN_INFO_PEAK_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAK)
-#define IIO_CHAN_INFO_PEAKSCALE_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PEAKSCALE)
-#define IIO_CHAN_INFO_PEAKSCALE_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PEAKSCALE)
-#define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SEPARATE_BIT	\
-	IIO_CHAN_INFO_SEPARATE_BIT(				\
-		IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW)
-#define IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW_SHARED_BIT	\
-	IIO_CHAN_INFO_SHARED_BIT(				\
-		IIO_CHAN_INFO_QUADRATURE_CORRECTION_RAW)
-#define IIO_CHAN_INFO_AVERAGE_RAW_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_AVERAGE_RAW)
-#define IIO_CHAN_INFO_AVERAGE_RAW_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_AVERAGE_RAW)
-#define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SHARED_BIT \
-	IIO_CHAN_INFO_SHARED_BIT(			       \
-		IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
-#define IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY_SEPARATE_BIT \
-	IIO_CHAN_INFO_SEPARATE_BIT(			       \
-		IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY)
-#define IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT		\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_SAMP_FREQ)
-#define IIO_CHAN_INFO_SAMP_FREQ_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_SAMP_FREQ)
-#define IIO_CHAN_INFO_FREQUENCY_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_FREQUENCY)
-#define IIO_CHAN_INFO_FREQUENCY_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_FREQUENCY)
-#define IIO_CHAN_INFO_PHASE_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_PHASE)
-#define IIO_CHAN_INFO_PHASE_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_PHASE)
-#define IIO_CHAN_INFO_HARDWAREGAIN_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
-#define IIO_CHAN_INFO_HARDWAREGAIN_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HARDWAREGAIN)
-#define IIO_CHAN_INFO_HYSTERESIS_SEPARATE_BIT			\
-	IIO_CHAN_INFO_SEPARATE_BIT(IIO_CHAN_INFO_HYSTERESIS)
-#define IIO_CHAN_INFO_HYSTERESIS_SHARED_BIT			\
-	IIO_CHAN_INFO_SHARED_BIT(IIO_CHAN_INFO_HYSTERESIS)
-
 enum iio_endian {
 	IIO_CPU,
 	IIO_BE,
@@ -281,8 +211,7 @@ 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)) |
-	       (chan->info_mask_separate & type) |
+	return (chan->info_mask_separate & type) |
 	       (chan->info_mask_shared_by_type & type);
 }
 
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 79+ messages in thread

* Re: [PATCH 00/67 V2] IIO break info_mask into a pair of masks
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (66 preceding siblings ...)
  2013-03-02 16:17 ` [PATCH 67/67] iio:core drop info_mask from struct iio_info Jonathan Cameron
@ 2013-03-04  9:09 ` Lars-Peter Clausen
  2013-03-04  9:15   ` Jonathan Cameron
  2013-03-17 19:51 ` Jonathan Cameron
  68 siblings, 1 reply; 79+ messages in thread
From: Lars-Peter Clausen @ 2013-03-04  9:09 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
> 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 :(

Hi Jonathan,

Looks good on a first glimpse. Can you push this to a branch on your repo?
Makes testing things easier.

Thanks,
- Lars


> 
> 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)
> or
> in_accel_scale (for all accel channels)
> 
> in_illuminance0_calibbias
> or
> in_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(-)
> 


^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 00/67 V2] IIO break info_mask into a pair of masks
  2013-03-04  9:09 ` [PATCH 00/67 V2] IIO break info_mask into a pair of masks Lars-Peter Clausen
@ 2013-03-04  9:15   ` Jonathan Cameron
  2013-03-04 18:09     ` Jonathan Cameron
  0 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-04  9:15 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Jonathan Cameron, linux-iio

On 04/03/13 09:09, Lars-Peter Clausen wrote:
> On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
>> 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 :(
>
> 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.
>
> Thanks,
> - Lars
>
>
>>
>> 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)
>> or
>> in_accel_scale (for all accel channels)
>>
>> in_illuminance0_calibbias
>> or
>> in_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(-)
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 58/67] staging:iio:light:isl29018 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:17 ` [PATCH 58/67] staging:iio:light:isl29018 " Jonathan Cameron
@ 2013-03-04 16:47   ` Rhyland Klein
  0 siblings, 0 replies; 79+ messages in thread
From: Rhyland Klein @ 2013-03-04 16:47 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On 3/2/2013 11:17 AM, Jonathan Cameron wrote:
> The original info_mask is going away in favour of the broken out versions.
>
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> cc: Rhyland Klein <rklein@nvidia.com>
> ---
>   drivers/staging/iio/light/isl29018.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/iio/light/isl29018.c b/drivers/staging/iio/light/isl29018.c
> index b0adac0..82478a5 100644
> --- a/drivers/staging/iio/light/isl29018.c
> +++ b/drivers/staging/iio/light/isl29018.c
> @@ -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),
>   	}
>   };
>   
Ack-ed-by: Rhyland Klein <rklein@nvidia.com>

-- 
nvpublic


^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 00/67 V2] IIO break info_mask into a pair of masks
  2013-03-04  9:15   ` Jonathan Cameron
@ 2013-03-04 18:09     ` Jonathan Cameron
  2013-03-04 19:13       ` Lars-Peter Clausen
  0 siblings, 1 reply; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-04 18:09 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Lars-Peter Clausen, linux-iio

On 03/04/2013 09:15 AM, Jonathan Cameron wrote:
> On 04/03/13 09:09, Lars-Peter Clausen wrote:
>> On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
>>> 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 :(
>>
>> 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

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 37/67] iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 ` [PATCH 37/67] iio:imu:adis16400 " Jonathan Cameron
@ 2013-03-04 18:48   ` Lars-Peter Clausen
  2013-03-04 21:02     ` Jonathan Cameron
  0 siblings, 1 reply; 79+ messages in thread
From: Lars-Peter Clausen @ 2013-03-04 18:48 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
> The original info_mask is going away in favour of the broken out versions.
> 
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> cc: Lars-Peter Clausen <lars@metafoo.de>
> ---
>  drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++--------------------
>  1 file changed, 23 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
> index b7f215e..2111068 100644
> --- a/drivers/iio/imu/adis16400_core.c
> +++ b/drivers/iio/imu/adis16400_core.c
> @@ -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.

> @@ -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.


^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 00/67 V2] IIO break info_mask into a pair of masks
  2013-03-04 18:09     ` Jonathan Cameron
@ 2013-03-04 19:13       ` Lars-Peter Clausen
  0 siblings, 0 replies; 79+ messages in thread
From: Lars-Peter Clausen @ 2013-03-04 19:13 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: Jonathan Cameron, linux-iio

On 03/04/2013 07:09 PM, Jonathan Cameron wrote:
> On 03/04/2013 09:15 AM, Jonathan Cameron wrote:
>> On 04/03/13 09:09, Lars-Peter Clausen wrote:
>>> On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
>>>> 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 :(
>>>
>>> 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 <lars@metafoo.de> 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

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 37/67] iio:imu:adis16400 move to info_mask_(shared_by_type/separate)
  2013-03-04 18:48   ` Lars-Peter Clausen
@ 2013-03-04 21:02     ` Jonathan Cameron
  0 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-04 21:02 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: linux-iio

On 03/04/2013 06:48 PM, Lars-Peter Clausen wrote:
> On 03/02/2013 05:16 PM, Jonathan Cameron wrote:
>> The original info_mask is going away in favour of the broken out versions.
>>
>> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
>> cc: Lars-Peter Clausen <lars@metafoo.de>
>> ---
>>  drivers/iio/imu/adis16400_core.c | 47 ++++++++++++++++++++--------------------
>>  1 file changed, 23 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
>> index b7f215e..2111068 100644
>> --- a/drivers/iio/imu/adis16400_core.c
>> +++ b/drivers/iio/imu/adis16400_core.c
>> @@ -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.
> 
>> @@ -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.

^ permalink raw reply	[flat|nested] 79+ messages in thread

* RE: [PATCH 13/67] iio:adc:lp8778_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 ` [PATCH 13/67] iio:adc:lp8778_adc " Jonathan Cameron
@ 2013-03-07  0:49   ` Kim, Milo
  0 siblings, 0 replies; 79+ messages in thread
From: Kim, Milo @ 2013-03-07  0:49 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

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

> -----Original Message-----
> From: Jonathan Cameron [mailto:jic23@kernel.org]
> Sent: Sunday, March 03, 2013 1:17 AM
> To: linux-iio@vger.kernel.org
> Cc: Jonathan Cameron; Kim, Milo
> Subject: [PATCH 13/67] iio:adc:lp8778_adc move to
> info_mask_(shared_by_type/separate)
>=20
> The original info_mask is going away in favour of the broken out
> versions.
>=20
> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
> cc: Milo(Woogyom) Kim <milo.kim@ti.com>
> ---
>  drivers/iio/adc/lp8788_adc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/drivers/iio/adc/lp8788_adc.c
> b/drivers/iio/adc/lp8788_adc.c
> index 763f575..62bc39e 100644
> --- a/drivers/iio/adc/lp8788_adc.c
> +++ b/drivers/iio/adc/lp8788_adc.c
> @@ -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

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 12/67] iio:adc:at91_adc move to info_mask_(shared_by_type/separate)
  2013-03-02 16:16 ` [PATCH 12/67] iio:adc:at91_adc " Jonathan Cameron
@ 2013-03-10 10:41   ` Maxime Ripard
  0 siblings, 0 replies; 79+ messages in thread
From: Maxime Ripard @ 2013-03-10 10:41 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

Hi Jonathan,

Le 02/03/2013 17:16, Jonathan Cameron a écrit :
> The original info_mask is going away in favour of the broken out versions.

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Maxime


-- 
Maxime Ripard, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 79+ messages in thread

* Re: [PATCH 00/67 V2] IIO break info_mask into a pair of masks
  2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
                   ` (67 preceding siblings ...)
  2013-03-04  9:09 ` [PATCH 00/67 V2] IIO break info_mask into a pair of masks Lars-Peter Clausen
@ 2013-03-17 19:51 ` Jonathan Cameron
  68 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-03-17 19:51 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio

Whole series (and the two catching missed drivers) applied to togreg branch of
iio.git

On 03/02/2013 04:16 PM, Jonathan Cameron wrote:
> 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)
> or
> in_accel_scale (for all accel channels)
> 
> in_illuminance0_calibbias
> or
> in_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(-)
> 

^ permalink raw reply	[flat|nested] 79+ messages in thread

* [PATCH 51/67] staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate)
  2013-02-27 20:38 [PATCH 00/67] " Jonathan Cameron
@ 2013-02-27 20:38 ` Jonathan Cameron
  0 siblings, 0 replies; 79+ messages in thread
From: Jonathan Cameron @ 2013-02-27 20:38 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

The original info_mask is going away in favour of the broken out versions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
cc: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/staging/iio/adc/ad799x_core.c | 76 +++++++++++++++++------------------
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/iio/adc/ad799x_core.c b/drivers/staging/iio/adc/ad799x_core.c
index 077eedb..5ceaf04 100644
--- a/drivers/staging/iio/adc/ad799x_core.c
+++ b/drivers/staging/iio/adc/ad799x_core.c
@@ -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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = 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 = IIO_CHAN_INFO_RAW ,
 				.scan_index = 7,
 				.scan_type = IIO_ST('u', 12, 16, 0),
 			},
-- 
1.8.1.1


^ permalink raw reply related	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2013-03-17 19:51 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02 16:16 [PATCH 00/67 V2] IIO break info_mask into a pair of masks Jonathan Cameron
2013-03-02 16:16 ` [PATCH 01/67] iio: Add broken out info_mask fields for shared_by_type and separate Jonathan Cameron
2013-03-02 16:16 ` [PATCH 02/67] iio:adc:max1363 move to info_mask_(shared_by_type/separate) Jonathan Cameron
2013-03-02 16:16 ` [PATCH 03/67] staging:iio:dummy " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 04/67] iio:hid_sensors " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 05/67] iio:accel:kxsd9 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 06/67] iio:st_sensors " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 07/67] iio:adc:ad_sigma_delta " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 08/67] iio:adc:ad7266 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 09/67] iio:adc:ad7298 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 10/67] iio:adc:ad7476 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 11/67] iio:adc:ad7887 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 12/67] iio:adc:at91_adc " Jonathan Cameron
2013-03-10 10:41   ` Maxime Ripard
2013-03-02 16:16 ` [PATCH 13/67] iio:adc:lp8778_adc " Jonathan Cameron
2013-03-07  0:49   ` Kim, Milo
2013-03-02 16:16 ` [PATCH 14/67] iio:adc:ti-adc081 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 15/67] iio:adc:ti_am335x_adc " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 16/67] iio:adc:viperboard_adc " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 17/67] iio:amplifiers:ad8366 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 18/67] iio:dac:ad5064 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 19/67] iio:dac:ad5360 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 20/67] iio:dac:ad5380 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 21/67] iio:dac:ad5421 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 22/67] iio:dac:ad5446 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 23/67] iio:dac:ad5449 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 24/67] iio:dac:ad5504 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 25/67] iio:dac:ad5624r " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 26/67] iio:dac:ad5686 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 27/67] iio:dac:ad5755 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 28/67] iio:dac:ad5764 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 29/67] iio:dac:ad5791 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 30/67] iio:dac:max517 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 31/67] iio:dac:mcp4725 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 32/67] iio:freq:ad9523 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 33/67] iio:gyro:adis16080 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 34/67] iio:gyro:adis16136 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 35/67] iio:gyro:adxrs450 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 36/67] iio:gyro:itg3200_core " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 37/67] iio:imu:adis16400 " Jonathan Cameron
2013-03-04 18:48   ` Lars-Peter Clausen
2013-03-04 21:02     ` Jonathan Cameron
2013-03-02 16:16 ` [PATCH 38/67] iio:imu:adis16480 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 39/67] iio:imu:mpu6050 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 40/67] iio:light:adjd_s311 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 41/67] iio:light:lm3533 " Jonathan Cameron
2013-03-02 16:16 ` [PATCH 42/67] iio:light:tsl2563 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 43/67] iio:light:vcnl4000 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 44/67] staging:iio:accel:adis " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 45/67] staging:iio:accel:adis16220 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 46/67] staging:iio:accel:lis3l02dq " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 47/67] staging:iio:accel:sca3000 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 48/67] staging:iio:adc:ad7280a " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 49/67] staging:iio:adc:ad7291 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 50/67] staging:iio:adc:ad7606 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 51/67] staging:iio:adc:ad799x " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 52/67] staging:iio:cdc:ad7150 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 53/67] staging:iio:cdc:ad7152 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 54/67] staging:iio:cdc:ad7746 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 55/67] staging:iio:gyro:adis16060 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 56/67] staging:iio:gyro:adis16130 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 57/67] staging:iio:impedance:ad5933 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 58/67] staging:iio:light:isl29018 " Jonathan Cameron
2013-03-04 16:47   ` Rhyland Klein
2013-03-02 16:17 ` [PATCH 59/67] staging:iio:light:isl29028 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 60/67] staging:iio:light:tsl2x7x " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 61/67] staging:iio:mag:ak8975 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 62/67] staging:iio:magnetometer:hmc5843 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 63/67] staging:iio:meter:ade7758 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 64/67] staging:iio:resolver:ad2s1200 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 65/67] staging:iio:resolver:ad2s1210 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 66/67] staging:iio:resolver:ad2s90 " Jonathan Cameron
2013-03-02 16:17 ` [PATCH 67/67] iio:core drop info_mask from struct iio_info Jonathan Cameron
2013-03-04  9:09 ` [PATCH 00/67 V2] IIO break info_mask into a pair of masks Lars-Peter Clausen
2013-03-04  9:15   ` Jonathan Cameron
2013-03-04 18:09     ` Jonathan Cameron
2013-03-04 19:13       ` Lars-Peter Clausen
2013-03-17 19:51 ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2013-02-27 20:38 [PATCH 00/67] " Jonathan Cameron
2013-02-27 20:38 ` [PATCH 51/67] staging:iio:adc:ad799x move to info_mask_(shared_by_type/separate) Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.