Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5aa96188 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

staging:iio: remove broken support for multiple event interfaces.



We don't have a use case for these.  Two drivers appeared to use them
but both report all events on the first.

V2: Remove now irrelevant comment.
V3: Include fixup for adc/ad7280a.c

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b3874069
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -452,7 +452,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
				 &t);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Z,
@@ -461,7 +461,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
			       timestamp);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_LOW)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Z,
@@ -470,7 +470,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
			       timestamp);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_HIGH)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Y,
@@ -479,7 +479,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
			       timestamp);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_LOW)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Y,
@@ -488,7 +488,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
			       timestamp);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_HIGH)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_X,
@@ -497,7 +497,7 @@ static irqreturn_t lis3l02dq_event_handler(int irq, void *private)
			       timestamp);

	if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_LOW)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_X,
@@ -651,7 +651,6 @@ static const struct attribute_group lis3l02dq_attribute_group = {
};

static const struct iio_info lis3l02dq_info = {
	.num_interrupt_lines = 1,
	.read_raw = &lis3l02dq_read_raw,
	.write_raw = &lis3l02dq_write_raw,
	.read_event_value = &lis3l02dq_read_thresh,
+4 −5
Original line number Diff line number Diff line
@@ -815,7 +815,7 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
	sca3000_ring_int_process(val, indio_dev->ring);

	if (val & SCA3000_INT_STATUS_FREE_FALL)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_X_AND_Y_AND_Z,
@@ -824,7 +824,7 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
			       last_timestamp);

	if (val & SCA3000_INT_STATUS_Y_TRIGGER)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Y,
@@ -833,7 +833,7 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
			       last_timestamp);

	if (val & SCA3000_INT_STATUS_X_TRIGGER)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_X,
@@ -842,7 +842,7 @@ static irqreturn_t sca3000_event_handler(int irq, void *private)
			       last_timestamp);

	if (val & SCA3000_INT_STATUS_Z_TRIGGER)
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_MOD_EVENT_CODE(IIO_ACCEL,
						  0,
						  IIO_MOD_Z,
@@ -1103,7 +1103,6 @@ error_ret:
static const struct iio_info sca3000_info = {
	.attrs = &sca3000_attribute_group,
	.read_raw = &sca3000_read_raw,
	.num_interrupt_lines = 1,
	.event_attrs = &sca3000_event_attribute_group,
	.read_event_value = &sca3000_read_thresh,
	.write_event_value = &sca3000_write_thresh,
+12 −9
Original line number Diff line number Diff line
@@ -653,30 +653,34 @@ static irqreturn_t ad7150_event_handler(int irq, void *private)

	ad7150_i2c_read(chip, AD7150_STATUS, &int_status, 1);

	if ((int_status & AD7150_STATUS_OUT1) && !(chip->old_state & AD7150_STATUS_OUT1))
		iio_push_event(indio_dev, 0,
	if ((int_status & AD7150_STATUS_OUT1) &&
	    !(chip->old_state & AD7150_STATUS_OUT1))
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_IN,
						    0,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_RISING),
				timestamp);
	else if ((!(int_status & AD7150_STATUS_OUT1)) && (chip->old_state & AD7150_STATUS_OUT1))
		iio_push_event(indio_dev, 0,
	else if ((!(int_status & AD7150_STATUS_OUT1)) &&
		 (chip->old_state & AD7150_STATUS_OUT1))
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_IN,
						    0,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_FALLING),
			       timestamp);

	if ((int_status & AD7150_STATUS_OUT2) && !(chip->old_state & AD7150_STATUS_OUT2))
		iio_push_event(indio_dev, 0,
	if ((int_status & AD7150_STATUS_OUT2) &&
	    !(chip->old_state & AD7150_STATUS_OUT2))
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_IN,
						    1,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_RISING),
			       timestamp);
	else if ((!(int_status & AD7150_STATUS_OUT2)) && (chip->old_state & AD7150_STATUS_OUT2))
		iio_push_event(indio_dev, 0,
	else if ((!(int_status & AD7150_STATUS_OUT2)) &&
		 (chip->old_state & AD7150_STATUS_OUT2))
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_IN,
						    1,
						    IIO_EV_TYPE_THRESH,
@@ -705,7 +709,6 @@ static struct attribute_group ad7150_event_attribute_group = {

static const struct iio_info ad7150_info = {
	.attrs = &ad7150_attribute_group,
	.num_interrupt_lines = 1,
	.event_attrs = &ad7150_event_attribute_group,
	.driver_module = THIS_MODULE,
};
+4 −5
Original line number Diff line number Diff line
@@ -691,7 +691,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
		if (((channels[i] >> 23) & 0xF) <= AD7280A_CELL_VOLTAGE_6) {
			if (((channels[i] >> 11) & 0xFFF) >=
				st->cell_threshhigh)
				iio_push_event(dev_info, 0,
				iio_push_event(dev_info,
					IIO_UNMOD_EVENT_CODE(IIO_IN_DIFF,
					0,
					IIO_EV_TYPE_THRESH,
@@ -699,7 +699,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
					iio_get_time_ns());
			else if (((channels[i] >> 11) & 0xFFF) <=
				st->cell_threshlow)
				iio_push_event(dev_info, 0,
				iio_push_event(dev_info,
					IIO_UNMOD_EVENT_CODE(IIO_IN_DIFF,
					0,
					IIO_EV_TYPE_THRESH,
@@ -707,7 +707,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
					iio_get_time_ns());
		} else {
			if (((channels[i] >> 11) & 0xFFF) >= st->aux_threshhigh)
				iio_push_event(dev_info, 0,
				iio_push_event(dev_info,
					IIO_UNMOD_EVENT_CODE(IIO_TEMP,
					0,
					IIO_EV_TYPE_THRESH,
@@ -715,7 +715,7 @@ static irqreturn_t ad7280_event_handler(int irq, void *private)
					iio_get_time_ns());
			else if (((channels[i] >> 11) & 0xFFF) <=
				st->aux_threshlow)
				iio_push_event(dev_info, 0,
				iio_push_event(dev_info,
					IIO_UNMOD_EVENT_CODE(IIO_TEMP,
					0,
					IIO_EV_TYPE_THRESH,
@@ -809,7 +809,6 @@ static int ad7280_read_raw(struct iio_dev *dev_info,

static const struct iio_info ad7280_info = {
	.read_raw = &ad7280_read_raw,
	.num_interrupt_lines = 1,
	.event_attrs = &ad7280_event_attrs_group,
	.attrs = &ad7280_attrs_group,
	.driver_module = THIS_MODULE,
+6 −7
Original line number Diff line number Diff line
@@ -479,28 +479,28 @@ static irqreturn_t ad7291_event_handler(int irq, void *private)
	ad7291_i2c_write(chip, AD7291_COMMAND, command);

	if (t_status & (1 << 0))
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_TEMP,
						    0,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_FALLING),
			       timestamp);
	if (t_status & (1 << 1))
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_TEMP,
						    0,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_RISING),
			       timestamp);
	if (t_status & (1 << 2))
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_TEMP,
						    0,
						    IIO_EV_TYPE_THRESH,
						    IIO_EV_DIR_FALLING),
			       timestamp);
	if (t_status & (1 << 3))
		iio_push_event(indio_dev, 0,
		iio_push_event(indio_dev,
			       IIO_UNMOD_EVENT_CODE(IIO_TEMP,
						    0,
						    IIO_EV_TYPE_THRESH,
@@ -509,14 +509,14 @@ static irqreturn_t ad7291_event_handler(int irq, void *private)

	for (i = 0; i < AD7291_VOLTAGE_LIMIT_COUNT*2; i += 2) {
		if (v_status & (1 << i))
			iio_push_event(indio_dev, 0,
			iio_push_event(indio_dev,
				       IIO_UNMOD_EVENT_CODE(IIO_IN,
							    i/2,
							    IIO_EV_TYPE_THRESH,
							    IIO_EV_DIR_FALLING),
				       timestamp);
		if (v_status & (1 << (i + 1)))
			iio_push_event(indio_dev, 0,
			iio_push_event(indio_dev,
				       IIO_UNMOD_EVENT_CODE(IIO_IN,
							    i/2,
							    IIO_EV_TYPE_THRESH,
@@ -780,7 +780,6 @@ static struct attribute_group ad7291_event_attribute_group = {

static const struct iio_info ad7291_info = {
	.attrs = &ad7291_attribute_group,
	.num_interrupt_lines = 1,
	.event_attrs = &ad7291_event_attribute_group,
};

Loading