aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/light
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-04-15 17:41:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-18 16:38:21 -0700
commita8c0ed756574ba5a484cd8238892f88501ff400d (patch)
treeffc3b76a025874c165d8a137d1cb0bf1fcdf0f7c /drivers/staging/iio/light
parentstaging:iio:meter Add IIO_CHAN_INFO_RAW entries to all drivers. (diff)
downloadlinux-dev-a8c0ed756574ba5a484cd8238892f88501ff400d.tar.xz
linux-dev-a8c0ed756574ba5a484cd8238892f88501ff400d.zip
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: Jonathan Cameron <jic23@kernel.org> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/light')
-rw-r--r--drivers/staging/iio/light/isl29028.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/iio/light/isl29028.c b/drivers/staging/iio/light/isl29028.c
index 4e6ac24d7c79..11dc8a9e52af 100644
--- a/drivers/staging/iio/light/isl29028.c
+++ b/drivers/staging/iio/light/isl29028.c
@@ -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,
}
};