summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/light/tsl2563.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 09:44:56 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 09:44:56 -0700
commite4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch)
treeea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/iio/light/tsl2563.c
parent81280572ca6f54009edfa4deee563e8678784218 (diff)
parenta4ac0d847af9dd34d5953a5e264400326144b6b2 (diff)
downloadop-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.zip
op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.gz
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/light/tsl2563.c')
-rw-r--r--drivers/staging/iio/light/tsl2563.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/staging/iio/light/tsl2563.c b/drivers/staging/iio/light/tsl2563.c
index 98f8b78..dadae75 100644
--- a/drivers/staging/iio/light/tsl2563.c
+++ b/drivers/staging/iio/light/tsl2563.c
@@ -584,14 +584,14 @@ static ssize_t tsl2563_calib_store(struct device *dev,
return len;
}
-static IIO_DEVICE_ATTR(intensity_both_raw, S_IRUGO,
+static IIO_DEVICE_ATTR(intensity0_both_raw, S_IRUGO,
tsl2563_adc_show, NULL, 0);
-static IIO_DEVICE_ATTR(intensity_ir_raw, S_IRUGO,
+static IIO_DEVICE_ATTR(intensity1_ir_raw, S_IRUGO,
tsl2563_adc_show, NULL, 1);
static DEVICE_ATTR(illuminance0_input, S_IRUGO, tsl2563_lux_show, NULL);
-static IIO_DEVICE_ATTR(intensity_both_calibgain, S_IRUGO | S_IWUSR,
+static IIO_DEVICE_ATTR(intensity0_both_calibgain, S_IRUGO | S_IWUSR,
tsl2563_calib_show, tsl2563_calib_store, 0);
-static IIO_DEVICE_ATTR(intensity_ir_calibgain, S_IRUGO | S_IWUSR,
+static IIO_DEVICE_ATTR(intensity1_ir_calibgain, S_IRUGO | S_IWUSR,
tsl2563_calib_show, tsl2563_calib_store, 1);
static ssize_t tsl2563_show_name(struct device *dev,
@@ -606,11 +606,11 @@ static ssize_t tsl2563_show_name(struct device *dev,
static DEVICE_ATTR(name, S_IRUGO, tsl2563_show_name, NULL);
static struct attribute *tsl2563_attributes[] = {
- &iio_dev_attr_intensity_both_raw.dev_attr.attr,
- &iio_dev_attr_intensity_ir_raw.dev_attr.attr,
+ &iio_dev_attr_intensity0_both_raw.dev_attr.attr,
+ &iio_dev_attr_intensity1_ir_raw.dev_attr.attr,
&dev_attr_illuminance0_input.attr,
- &iio_dev_attr_intensity_both_calibgain.dev_attr.attr,
- &iio_dev_attr_intensity_ir_calibgain.dev_attr.attr,
+ &iio_dev_attr_intensity0_both_calibgain.dev_attr.attr,
+ &iio_dev_attr_intensity1_ir_calibgain.dev_attr.attr,
&dev_attr_name.attr,
NULL
};
@@ -673,13 +673,13 @@ error_ret:
return ret < 0 ? ret : len;
}
-static IIO_DEVICE_ATTR(intensity_both_thresh_high_value,
+static IIO_DEVICE_ATTR(intensity0_both_raw_thresh_rising_value,
S_IRUGO | S_IWUSR,
tsl2563_read_thresh,
tsl2563_write_thresh,
TSL2563_REG_HIGHLOW);
-static IIO_DEVICE_ATTR(intensity_both_thresh_low_value,
+static IIO_DEVICE_ATTR(intensity0_both_raw_thresh_falling_value,
S_IRUGO | S_IWUSR,
tsl2563_read_thresh,
tsl2563_write_thresh,
@@ -706,8 +706,11 @@ static void tsl2563_int_bh(struct work_struct *work_s)
u8 cmd = TSL2563_CMD | TSL2563_CLEARINT;
iio_push_event(chip->indio_dev, 0,
- IIO_EVENT_CODE_LIGHT_BASE,
- chip->event_timestamp);
+ IIO_UNMOD_EVENT_CODE(IIO_EV_CLASS_LIGHT,
+ 0,
+ IIO_EV_TYPE_THRESH,
+ IIO_EV_DIR_EITHER),
+ chip->event_timestamp);
/* reenable_irq */
enable_irq(chip->client->irq);
@@ -788,16 +791,16 @@ error_ret:
return (ret < 0) ? ret : len;
}
-IIO_EVENT_ATTR(intensity_both_thresh_both_en,
+IIO_EVENT_ATTR(intensity0_both_thresh_en,
tsl2563_read_interrupt_config,
tsl2563_write_interrupt_config,
0,
tsl2563_int_th);
static struct attribute *tsl2563_event_attributes[] = {
- &iio_event_attr_intensity_both_thresh_both_en.dev_attr.attr,
- &iio_dev_attr_intensity_both_thresh_high_value.dev_attr.attr,
- &iio_dev_attr_intensity_both_thresh_low_value.dev_attr.attr,
+ &iio_event_attr_intensity0_both_thresh_en.dev_attr.attr,
+ &iio_dev_attr_intensity0_both_raw_thresh_rising_value.dev_attr.attr,
+ &iio_dev_attr_intensity0_both_raw_thresh_falling_value.dev_attr.attr,
NULL,
};
OpenPOWER on IntegriCloud