]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
hid-sensor: Fix suspend/resume delay
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 1 Jun 2015 23:36:27 +0000 (16:36 -0700)
committerJonathan Cameron <jic23@kernel.org>
Sun, 19 Jul 2015 10:47:57 +0000 (11:47 +0100)
commit88cc7b4eee1e7b9bca1a64dae5adaa044cf72312
treed850e6ff1f90b95b49848817c1f0f5b0a6e43b3e
parentcbe4f4434ded7f3e581b9f7db34a875d0246210e
hid-sensor: Fix suspend/resume delay

By default all the sensors are runtime suspended state (lowest power
state). During Linux suspend process, all the run time suspended
devices are resumed and then suspended. This caused all sensors to
power up and introduced delay in suspend time, when we introduced
runtime PM for HID sensors. The opposite process happens during resume
process.

To fix this, we do powerup process of the sensors only when the request
is issued from user (raw or tiggerred). In this way when runtime,
resume calls for powerup it will simply return as this will not match
user requested state.

Note this is a regression fix as the increase in suspend / resume
times can be substantial (report of 8 seconds on Len's laptop!)

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tested-by: Len Brown <len.brown@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
include/linux/hid-sensor-hub.h