Commit 7775e1d1 authored by Brian Masney's avatar Brian Masney Committed by Jonathan Cameron

staging: iio: tsl2x7x: move calibscale_available attribute to IIO_INTENSITY channel

The calibscale_available attribute is currently associated with the
IIO_LIGHT channel but should be associated with the IIO_INTENSITY
channel. This patch corrects that association and it also corrects
lines that were unnecessarily split for the
in_intensity0_integration_time sysfs attribute.
Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 95d22154
......@@ -777,9 +777,9 @@ static int tsl2x7x_prox_cal(struct iio_dev *indio_dev)
}
static ssize_t
in_illuminance0_calibscale_available_show(struct device *dev,
struct device_attribute *attr,
char *buf)
in_intensity0_calibscale_available_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct tsl2X7X_chip *chip = iio_priv(dev_to_iio_dev(dev));
......@@ -1247,7 +1247,7 @@ static int tsl2x7x_write_raw(struct iio_dev *indio_dev,
return tsl2x7x_invoke_change(indio_dev);
}
static DEVICE_ATTR_RO(in_illuminance0_calibscale_available);
static DEVICE_ATTR_RO(in_intensity0_calibscale_available);
static DEVICE_ATTR_RW(in_illuminance0_target_input);
......@@ -1321,9 +1321,8 @@ static irqreturn_t tsl2x7x_event_handler(int irq, void *private)
}
static struct attribute *tsl2x7x_ALS_device_attrs[] = {
&dev_attr_in_illuminance0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available
.dev_attr.attr,
&dev_attr_in_intensity0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available.dev_attr.attr,
&dev_attr_in_illuminance0_target_input.attr,
&dev_attr_in_illuminance0_calibrate.attr,
&dev_attr_in_illuminance0_lux_table.attr,
......@@ -1336,9 +1335,8 @@ static struct attribute *tsl2x7x_PRX_device_attrs[] = {
};
static struct attribute *tsl2x7x_ALSPRX_device_attrs[] = {
&dev_attr_in_illuminance0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available
.dev_attr.attr,
&dev_attr_in_intensity0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available.dev_attr.attr,
&dev_attr_in_illuminance0_target_input.attr,
&dev_attr_in_illuminance0_calibrate.attr,
&dev_attr_in_illuminance0_lux_table.attr,
......@@ -1352,9 +1350,8 @@ static struct attribute *tsl2x7x_PRX2_device_attrs[] = {
};
static struct attribute *tsl2x7x_ALSPRX2_device_attrs[] = {
&dev_attr_in_illuminance0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available
.dev_attr.attr,
&dev_attr_in_intensity0_calibscale_available.attr,
&iio_const_attr_in_intensity0_integration_time_available.dev_attr.attr,
&dev_attr_in_illuminance0_target_input.attr,
&dev_attr_in_illuminance0_calibrate.attr,
&dev_attr_in_illuminance0_lux_table.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment