Commit a8c0ed75 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

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.
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a74437e4
...@@ -330,7 +330,8 @@ static int isl29028_read_raw(struct iio_dev *indio_dev, ...@@ -330,7 +330,8 @@ static int isl29028_read_raw(struct iio_dev *indio_dev,
mutex_lock(&chip->lock); mutex_lock(&chip->lock);
switch (mask) { switch (mask) {
case 0: case IIO_CHAN_INFO_RAW:
case IIO_CHAN_INFO_PROCESSED:
switch (chan->type) { switch (chan->type) {
case IIO_LIGHT: case IIO_LIGHT:
ret = isl29028_als_get(chip, val); ret = isl29028_als_get(chip, val);
...@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = { ...@@ -391,12 +392,15 @@ static const struct iio_chan_spec isl29028_channels[] = {
{ {
.type = IIO_LIGHT, .type = IIO_LIGHT,
.processed_val = 1, .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, .type = IIO_INTENSITY,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,
}, { }, {
.type = IIO_PROXIMITY, .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,
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment