linux-hardened/drivers/iio
Srinivas Pandruvada ad7532cefd iio: hid-sensor-trigger: Don't touch sensors unless user space requests
One of the user complained that on his system Thinkpad Yoga S1, with
commit f1664eaace ("iio: hid-sensor-trigger: Fix the race with user
space powering up sensors") causes the system to resume immediately
on suspend (S3 operation). On this system the sensor hub is on USB
and is a wake up device from S3. So if any sensor sends data on
motion, the system will wake up. This can be a legitimate use case
to wake up device motion, but that needs proper user space support
to set right thresholds.

In fact the above commit didn't cause this regression, but any operation
which cause sensors to wake up would have caused the same issue. So if
user reads the raw sensor data, same issue occurs, with or without this
commit. Only difference is that the above commit by default will trigger
a power up and power down of sensors as part of runtime pm enable
(runtime enable will cause a runtime resume callback followed by
runtime_suspend callback). Previously user has to do some action on
sensors.

On investigation it was observed that the current driver correctly
changing the state of all sensors to power off but then also some sensor
will still send some data. Only option is to never power up any sensor.

Only good option is to:
- Using sysfs interface disable USB as a wakeup device (This will not
need any driver change)

Since some user don't care about sensors. So for those users this change
brings back old functionality. As long as they don't cause any operation
to power up sensors (like raw read or start iio-sensor-proxy service),
the sensors will not be to touched. This is done by delaying run time
enable till user space does some operation with sensors.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196853
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-10-14 19:29:50 +01:00
..
accel iio: accel: add support to LIS3DHH 2017-10-10 20:40:54 +01:00
adc iio: adc: mcp320x: Add support for mcp3550/1/3 2017-10-09 21:01:36 +01:00
amplifiers iio:amplifiers:ad8366 drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:24:50 +01:00
buffer iio: buffer-dmaengine: Add missing header buffer_impl.h 2017-06-13 20:56:05 +01:00
chemical iio: chemical: ccs811: Add support for data ready trigger 2017-09-24 12:34:36 +01:00
common iio: hid-sensor-trigger: Don't touch sensors unless user space requests 2017-10-14 19:29:50 +01:00
counter iio:stm32-lp-timer and ep93xx: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-09-26 09:38:57 +02:00
dac iio: dac: ds4422/ds4424 dac driver 2017-10-09 20:49:39 +01:00
dummy iio: dummy: evgen: use irq_sim 2017-10-09 20:50:34 +01:00
frequency iio:frequency: drop assign iio_info.driver_module 2017-08-22 21:28:20 +01:00
gyro iio: gyro: st_gyro: add SPI-3wire support to st_gyro framework 2017-10-10 20:32:28 +01:00
health iio:health: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:29:44 +01:00
humidity iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:30:20 +01:00
imu iio: imu: st_lsm6dsx: add FIFO ops data structure 2017-10-09 20:51:01 +01:00
light iio: light: vl6180: Correct ALS scale for non-default gain/integration time 2017-10-09 20:50:21 +01:00
magnetometer iio: magnetometer: st_magn: add SPI-3wire support to LIS3MDL 2017-10-10 20:36:33 +01:00
multiplexer iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values 2017-09-03 18:10:29 +01:00
orientation iio:orientation: drop assign iio_info.driver_module 2017-08-22 21:33:36 +01:00
potentiometer iio:potentiometer:max5487: Drop explicit setting of module owner 2017-09-03 18:10:27 +01:00
potentiostat iio:potentiostat:lmp91000 drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:34:48 +01:00
pressure iio: st_sensors: split open-drain parameters for irq1 and irq2 2017-10-10 20:38:39 +01:00
proximity iio: proximity: Add rfd77402 driver 2017-10-14 18:28:51 +01:00
temperature iio:temperature: drop assignment of iio_info.driver_module 2017-08-22 22:14:52 +01:00
trigger Merge 4.14-rc4 into staging-next 2017-10-09 09:02:35 +02:00
iio_core.h iio:core: timestamping clock selection support 2016-06-30 19:41:38 +01:00
iio_core_trigger.h
industrialio-buffer.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
industrialio-configfs.c
industrialio-core.c Merge 4.14-rc4 into staging-next 2017-10-09 09:02:35 +02:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c iio: Add support for creating IIO devices via configfs 2016-05-04 11:43:54 +01:00
industrialio-sw-trigger.c
industrialio-trigger.c iio:trigger: Remove necessity to have a trig->ops structure. 2017-08-22 21:20:28 +01:00
industrialio-triggered-event.c
inkern.c First round of IIO new device support, features and cleanups for the 4.14 cycle. 2017-07-27 21:29:49 -07:00
Kconfig iio: multiplexer: new iio category and iio-mux driver 2017-06-03 19:29:26 +09:00
Makefile iio: multiplexer: new iio category and iio-mux driver 2017-06-03 19:29:26 +09:00