diff options
author | Jonathan Cameron | 2011-08-30 13:41:16 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-09-07 01:00:28 +0200 |
commit | 799390611daeabfdbee7a05891ad0c864c02a5e0 (patch) | |
tree | 86a0f2bdf72c0043c9e618d4a7b463862c115acc | |
parent | staging:iio: push "sysfs.h" and linux/irq.h out of iio.h (diff) | |
download | kernel-qcow2-linux-799390611daeabfdbee7a05891ad0c864c02a5e0.tar.gz kernel-qcow2-linux-799390611daeabfdbee7a05891ad0c864c02a5e0.tar.xz kernel-qcow2-linux-799390611daeabfdbee7a05891ad0c864c02a5e0.zip |
staging:iio:light:tsl2563 remove use of IIO_CHAN macro and make use modifier defines.
This avoids issues in the new event code introduced shortly + makes
moving this one out of staging easier.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/iio/light/tsl2563.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c index bd879ad836a6..3493d93e0ebe 100644 --- a/drivers/staging/iio/light/tsl2563.c +++ b/drivers/staging/iio/light/tsl2563.c @@ -528,16 +528,26 @@ error_ret: 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_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), + { + .type = IIO_LIGHT, + .indexed = 1, + .channel = 0, + }, { + .type = IIO_INTENSITY, + .modified = 1, + .channel2 = IIO_MOD_LIGHT_BOTH, + .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), + .event_mask = (IIO_EV_BIT(IIO_EV_TYPE_THRESH, + IIO_EV_DIR_RISING) | + IIO_EV_BIT(IIO_EV_TYPE_THRESH, + IIO_EV_DIR_FALLING)), + }, { + .type = IIO_INTENSITY, + .modified = 1, + .channel2 = IIO_MOD_LIGHT_BOTH, + .info_mask = (1 << IIO_CHAN_INFO_CALIBSCALE_SEPARATE), + } }; static int tsl2563_read_thresh(struct iio_dev *indio_dev, |