Skip to contentSkip to conversation

IIO break info_mask into a pair of masks - Additional drivers 2 (missed ones)

PATCH In review Jonathan Cameron 3 participants 6 messages Mar 4, 2013 – Mar 5, 2013

Subsystems (5)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

cover IIO break info_mask into a pair of masks - Additional drivers 2 (missed ones)

As Lars-Peter noticed, I missed these 3 drivers for some reason in the earlier two series of patches. Oops. Have now deployed grep more carefully/thoroughly.

These will shortly appear at an appropriate spot in the info_mask_split branch of iio.git.

This short series applies the equivalent changes to three drivers missed from the series in

[PATCH 00/67 V2] IIO break info_mask into a pair of masks was under way.

If there are no issues, I'll slot these in just before patch 67 of that series.

As a quick summary for anyone just looking at these, I am proposing to split info_mask into info_mask_separate and info_mask_shared_by_type so as to simplify the handling, shorten the code and make more space for new elements. With the benefit of hindsight info_mask should have been done like this in the first place.

Jonathan

Jonathan Cameron (3):
staging:iio:adc:spear move to info_mask_(shared_by_type/separate) staging:iio:adc:mxs move to info_mask_(shared_by_type/separate) staging:iio:adc:lpc32xx move to info_mask_(shared_by_type/separate)

 drivers/staging/iio/adc/lpc32xx_adc.c | 2 +-
 drivers/staging/iio/adc/mxs-lradc.c   | 2 +-
 drivers/staging/iio/adc/spear_adc.c   | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.1.4
author maintainer
#1 lore raw

PATCH 1/3 staging:iio:adc:spear move to info_mask_(shared_by_type/separate)

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

---
 drivers/staging/iio/adc/spear_adc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/adc/spear_adc.c +2 -2
index 13052ce..f45da42 100644
@@ -180,8 +180,8 @@ static int spear_read_raw(struct iio_dev *indio_dev,
 #define SPEAR_ADC_CHAN(idx) {				\
 	.type = IIO_VOLTAGE,				\
 	.indexed = 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),	\
 	.channel = idx,					\
 	.scan_type = {					\
 		.sign = 'u',				\
Signature · 1 line
1.8.1.4
author maintainer
#3 lore raw

PATCH 2/3 staging:iio:adc:mxs move to info_mask_(shared_by_type/separate)

In reply to Jonathan Cameron

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

---
 drivers/staging/iio/adc/mxs-lradc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/mxs-lradc.c +1 -1
index f5fb0df..4ef3070 100644
@@ -821,7 +821,7 @@ static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = {
 	.type = (chan_type),					\
 	.indexed = 1,						\
 	.scan_index = (idx),					\
-	.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,		\
+	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
 	.channel = (idx),					\
 	.scan_type = {						\
 		.sign = 'u',					\
Signature · 1 line
1.8.1.4
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] staging:iio:adc:mxs move to info_mask_(shared_by_type/separate)

Dear Jonathan Cameron,

Quoted 13 lines

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

---
 drivers/staging/iio/adc/mxs-lradc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/staging/iio/adc/mxs-lradc.c index f5fb0df..4ef3070 100644

drivers/staging/iio/adc/mxs-lradc.c static const struct iio_buffer_setup_ops · line 821

Quoted 1 line
drivers/staging/iio/adc/mxs-lradc.c +0 -0
@@ -821,7 +821,7 @@ static const struct iio_buffer_setup_ops
 mxs_lradc_buffer_ops = { .type = (chan_type),					

\

drivers/staging/iio/adc/mxs-lradc.c static const struct iio_buffer_setup_ops mxs_lradc_buffer_ops = { · line 827

Quoted 7 lines
drivers/staging/iio/adc/mxs-lradc.c +1 -1
 	.indexed = 1,						\
 	.scan_index = (idx),					\
-	.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,		\
+	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
 	.channel = (idx),					\
 	.scan_type = {						\
 		.sign = 'u',					\

Best regards,
Marek Vasut

author maintainer
#5 lore raw

PATCH 3/3 staging:iio:adc:lpc32xx move to info_mask_(shared_by_type/separate)

In reply to Jonathan Cameron

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

---
 drivers/staging/iio/adc/lpc32xx_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/adc/lpc32xx_adc.c +1 -1
index 0bf2a6c..2f2f7fd 100644
@@ -103,7 +103,7 @@ static const struct iio_info lpc32xx_adc_iio_info = {
 	.type = IIO_VOLTAGE,				\
 	.indexed = 1,					\
 	.channel = _index,				\
-	.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,	\
+	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),	\
 	.address = AD_IN * _index,			\
 	.scan_index = _index,				\
 }
Signature · 1 line
1.8.1.4