linux/drivers/iio
Srinivas Pandruvada 78107336ce iio:core: Handle error when mask type is not separate
commit 78b3321610 upstream.

When event spec is shared by multiple channels, which has definition
for mask_shared_by_type, iio_device_register_eventset fails.

For example:
static const struct iio_event_spec iio_dummy_events[] = {
	{
		.type = IIO_EV_TYPE_THRESH,
		.dir = IIO_EV_DIR_RISING,
		.mask_separate = BIT(IIO_EV_INFO_ENABLE),
		.mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
	}, {
		.type = IIO_EV_TYPE_THRESH,
		.dir = IIO_EV_DIR_FALLING,
		.mask_separate = BIT(IIO_EV_INFO_ENABLE),a
		.mask_shared_by_type = BIT(IIO_EV_INFO_VALUE),
	}
};

If two channels use this event spec, this will result in error.

This change handles EBUSY error similar to iio_device_add_info_mask_type().

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2014-07-28 08:05:57 -07:00
..
accel iio:accel:bma180: Use modifier instead of index in channel specification 2014-02-08 11:31:50 +00:00
adc iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends 2014-07-17 16:21:02 -07:00
amplifiers iio: amplifiers: ad8366: Remove regulator_put 2013-09-28 11:49:45 +01:00
common iio: hid-sensors: Fix power and report state 2013-12-02 21:05:32 +00:00
dac iio:dac:mcp4725 drop specification of scan type as unused in this driver. 2013-12-17 21:08:19 +00:00
frequency Merge 3.12-rc6 into staging-next. 2013-10-19 13:14:34 -07:00
gyro iio:gyro: bug on L3GD20H gyroscope support 2014-02-18 10:24:49 +00:00
humidity iio: Add new driver dht11 2013-12-03 20:22:30 +00:00
imu iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference 2014-06-07 10:28:15 -07:00
light iio: cm36651: Fix i2c client leak and possible NULL pointer dereference 2014-05-06 07:59:27 -07:00
magnetometer iio: Fix endianness issue in ak8975_read_axis() 2014-06-26 15:15:42 -04:00
orientation iio: hid-sensors: Added Inclinometer 3D 2013-12-03 20:31:59 +00:00
pressure iio: Fix two mpl3115 issues in measurement conversion 2014-06-26 15:15:42 -04:00
temperature Merge 3.12-rc2 into staging-next. 2013-09-25 08:59:04 -07:00
trigger iio:trigger: fix sysfs name on list mutex 2013-09-28 11:51:16 +01:00
buffer_cb.c iio: Add reference counting for buffers 2013-10-12 12:04:01 +01:00
iio_core.h iio: Factor IIO value formating into its own function 2013-10-12 12:23:33 +01:00
iio_core_trigger.h iio: fix semicolon in io_core_trigger.h 2013-08-03 18:40:32 +01:00
industrialio-buffer.c iio: querying buffer scan_mask should return 0/1 2014-05-06 07:59:27 -07:00
industrialio-core.c iio: Add support for humidity sensors 2013-12-03 20:22:29 +00:00
industrialio-event.c iio:core: Handle error when mask type is not separate 2014-07-28 08:05:57 -07:00
industrialio-trigger.c iio:trigger: Convert to use ATTRIBUTE_GROUPS 2013-12-03 20:22:29 +00:00
industrialio-triggered-buffer.c iio:triggered-buffer: Remove redundant call to iio_sw_buffer_preenable(). 2013-10-16 19:12:47 +01:00
inkern.c iio: of_iio_channel_get_by_name() returns non-null pointers for error legs 2014-07-09 11:18:27 -07:00
Kconfig iio: hid-sensors: Added Inclinometer 3D 2013-12-03 20:31:59 +00:00
kfifo_buf.c iio: kfifo_buf: Implement data_available() callback 2013-12-03 20:22:28 +00:00
Makefile iio: hid-sensors: Added Inclinometer 3D 2013-12-03 20:31:59 +00:00