Skip to content

Commit

Permalink
staging:iio:isl29028 Add IIO_CHAN_INFO_RAW/PROCESSED entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 18, 2012
1 parent a74437e commit a8c0ed7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/staging/iio/light/isl29028.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
}
};

Expand Down

0 comments on commit a8c0ed7

Please sign in to comment.