Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304368
b: refs/heads/master
c: 90354d0
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Apr 18, 2012
1 parent 42343a3 commit 5d31143
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5d016d46630968fcf9c329f5cf522a7c03b3888
refs/heads/master: 90354d0038e9e3d82d5fee5442d48f7cafb96a0c
8 changes: 6 additions & 2 deletions trunk/drivers/staging/iio/light/isl29018.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ static int isl29018_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 = isl29018_read_lux(client, val);
Expand Down Expand Up @@ -420,14 +421,17 @@ static const struct iio_chan_spec isl29018_channels[] = {
.indexed = 1,
.channel = 0,
.processed_val = IIO_PROCESSED,
.info_mask = IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
.info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
}, {
.type = IIO_INTENSITY,
.modified = 1,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,
.channel2 = IIO_MOD_LIGHT_IR,
}, {
/* Unindexed in current ABI. But perhaps it should be. */
.type = IIO_PROXIMITY,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT,
}
};

Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/staging/iio/light/tsl2563.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ static int tsl2563_read_raw(struct iio_dev *indio_dev,

mutex_lock(&chip->lock);
switch (m) {
case 0:
case IIO_CHAN_INFO_RAW:
case IIO_CHAN_INFO_PROCESSED:
switch (chan->type) {
case IIO_LIGHT:
ret = tsl2563_get_adc(chip);
Expand Down Expand Up @@ -535,12 +536,14 @@ static const struct iio_chan_spec tsl2563_channels[] = {
.type = IIO_LIGHT,
.indexed = 1,
.processed_val = 1,
.info_mask = IIO_CHAN_INFO_PROCESSED_SEPARATE_BIT,
.channel = 0,
}, {
.type = IIO_INTENSITY,
.modified = 1,
.channel2 = IIO_MOD_LIGHT_BOTH,
.info_mask = IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
.event_mask = (IIO_EV_BIT(IIO_EV_TYPE_THRESH,
IIO_EV_DIR_RISING) |
IIO_EV_BIT(IIO_EV_TYPE_THRESH,
Expand All @@ -549,7 +552,8 @@ static const struct iio_chan_spec tsl2563_channels[] = {
.type = IIO_INTENSITY,
.modified = 1,
.channel2 = IIO_MOD_LIGHT_IR,
.info_mask = IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
.info_mask = IIO_CHAN_INFO_RAW_SEPARATE_BIT |
IIO_CHAN_INFO_CALIBSCALE_SEPARATE_BIT,
}
};

Expand Down

0 comments on commit 5d31143

Please sign in to comment.