Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259650
b: refs/heads/master
c: 8f518d7
h: refs/heads/master
v: v3
  • Loading branch information
Bryan Freed authored and Greg Kroah-Hartman committed Jun 28, 2011
1 parent 4bd5433 commit 0903518
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: beeada734f9c6a11dbc37790848a19f3582440fc
refs/heads/master: 8f518d71f392b597832653f9438332ae27019da1
17 changes: 9 additions & 8 deletions trunk/drivers/staging/iio/light/tsl2563.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,15 +548,16 @@ static int tsl2563_read_raw(struct iio_dev *indio_dev,
return ret;
}

#define INFO_MASK (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE)
#define EVENT_MASK (IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) | \
IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING))
#define IIO_CHAN_2563(type, mod, proc, chan, imask, emask) \
IIO_CHAN(type, mod, 1, proc, NULL, chan, 0, imask, 0, 0, {}, emask)

static const struct iio_chan_spec tsl2563_channels[] = {
IIO_CHAN(IIO_LIGHT, 0, 1, 1, NULL, 0, 0, 0, 0, 0, {}, 0),
IIO_CHAN(IIO_INTENSITY, 1, 1, 0, "both", 0,
(1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), 0, 0, 0, {},
IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_RISING) |
IIO_EV_BIT(IIO_EV_TYPE_THRESH, IIO_EV_DIR_FALLING)),
IIO_CHAN(IIO_INTENSITY, 1, 1, 0, "ir", 1,
(1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), 0, 0, 0, {},
0)
IIO_CHAN_2563(IIO_LIGHT, 0, 1, 0, 0, 0),
IIO_CHAN_2563(IIO_INTENSITY, 1, 0, 0, INFO_MASK, EVENT_MASK),
IIO_CHAN_2563(IIO_INTENSITY, 1, 0, 1, INFO_MASK, 0),
};

static int tsl2563_read_thresh(struct iio_dev *indio_dev,
Expand Down

0 comments on commit 0903518

Please sign in to comment.