staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entries
Subsystems (3)
Jonathan Cameron
maintainerPATCH 1/1 staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entries
Precursor to making value read / write attribute optional. This one stands along as it merged just before the series doing all the other drivers.
---
This driver crossed with review of these patches. To test just apply it after the series
[PATCH 00/13 V2] IIO: Make the value attribute optional for channels
Fairly trivial case, but obviously I can't push out the removal of the old code until this is in place. In the meantime I'll push the rest of the conversion patches to Greg.
drivers/staging/iio/light/isl29028.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/staging/iio/light/isl29028.c +7 -3
@@ -330,7 +330,8 @@ static int isl29028_read_raw(struct iio_dev *indio_dev,mutex_lock (&chip->lock);switch (mask) { -case 0 : +case IIO_CHAN_INFO_RAW : +case IIO_CHAN_INFO_PROCESSED :switch (chan->type) {case IIO_LIGHT : ret =isl29028_als_get (chip, val);
@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = { { .type = IIO_LIGHT, .processed_val = 1, - .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | + IIO_CHAN_INFO_SCALE_SEPARATE_BIT, }, { .type = IIO_INTENSITY, + .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, }, { .type = IIO_PROXIMITY, - .info_mask = IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT, + .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | + IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT, } };
Signature · 1 line
1.7.9.4
Jonathan Cameron
maintainerQuoted 4 lines · Jonathan Cameron
Precursor to making value read / write attribute optional. This one stands along as it merged just before the series doing all the other drivers.
Note there is also a one line change to remove the processed_val line in the obvious patch later in the series...
Quoted 46 lines
Signed-off-by Jonathan Cameron <[email protected]>---
This driver crossed with review of these patches. To test just apply it after the series
[PATCH 00/13 V2] IIO: Make the value attribute optional for channelsFairly trivial case, but obviously I can't push out the removal of the old code until this is in place. In the meantime I'll push the rest of the conversion patches to Greg.
drivers/staging/iio/light/isl29028.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)drivers/staging/iio/light/isl29028.c +7
-3@@ -330,7 +330,8 @@ static int isl29028_read_raw(struct iio_dev *indio_dev,mutex_lock (&chip->lock);switch (mask) { -case 0 : +case IIO_CHAN_INFO_RAW : +case IIO_CHAN_INFO_PROCESSED :switch (chan->type) {case IIO_LIGHT : ret =isl29028_als_get (chip, val);@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = { { .type = IIO_LIGHT, .processed_val = 1, - .info_mask = IIO_CHAN_INFO_SCALE_SEPARATE_BIT, + .info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT | + IIO_CHAN_INFO_SCALE_SEPARATE_BIT, }, { .type = IIO_INTENSITY, + .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT, }, { .type = IIO_PROXIMITY, - .info_mask = IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT, + .info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT | + IIO_CHAN_INFO_SAMP_FREQ_SEPARATE_BIT, } };
Laxman Dewangan
Acked-byQuoted 10 lines · Jonathan Cameron
Quoted 4 lines · Jonathan Cameron
Precursor to making value read / write attribute optional. This one stands along as it merged just before the series doing all the other drivers.
Note there is also a one line change to remove the
processed_valline in the obvious patch later in the series...Quoted 2 lines
Signed-off-by Jonathan Cameron<[email protected]>
changes make more sense now. I was thinking that what is mask 0 when I started this driver and after reading other driver came to know about this.
Quoted 7 lines
drivers/staging/iio/light/isl29028.c static const struct iio_chan_spec isl29028_channels[] = { · line 394
Quoted 7 lines
switch (chan->type) { case IIO_LIGHT: ret = isl29028_als_get(chip, val);drivers/staging/iio/light/isl29028.c +0
-0@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = { { .type = IIO_LIGHT, .processed_val = 1,
processed_val should be removed here and already you have taken care.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
Quoted 6 lines · Laxman Dewangan
Quoted 5 lines · Jonathan Cameron
Quoted 4 lines · Jonathan Cameron
Precursor to making value read / write attribute optional. This one stands along as it merged just before the series doing all the other drivers.
Quoted 7 lines
Quoted 5 lines
Note there is also a one line change to remove the
processed_valline in the obvious patch later in the series...Quoted 2 lines
Signed-off-by Jonathan Cameron<[email protected]>Acked-by Laxman Dewangan <[email protected]>
Thanks for the fast response. Now I can get this out before any other drivers sneak past ;)
Quoted 4 lines
changes make more sense now. I was thinking that what is mask 0 when I started this driver and after reading other driver came to know about this.
Yup, it all got a bit ilogical in there. The wonders of code evolution.
Quoted 10 lines
Quoted 8 lines
drivers/staging/iio/light/isl29028.c static const struct iio_chan_spec · line 395
Quoted 8 lines
switch (chan->type) { case IIO_LIGHT: ret = isl29028_als_get(chip, val);drivers/staging/iio/light/isl29028.c +0
-0@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = { { .type = IIO_LIGHT, .processed_val = 1,
processed_valshould be removed here and already you have taken care.
yup, that occurs 2 patches later to keep things working all the way through the series.
Quoted 17 lines
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html