diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2015-06-02 01:36:27 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-06-02 23:15:26 +0200 |
commit | 1e25aa9641e8f3fa39cd5e46b4afcafd7f12a44b (patch) | |
tree | 4607182462e095a8bb77e977859a097555a679d5 /include | |
parent | iio: adc: twl6030-gpadc: Fix modalias (diff) | |
download | linux-1e25aa9641e8f3fa39cd5e46b4afcafd7f12a44b.tar.xz linux-1e25aa9641e8f3fa39cd5e46b4afcafd7f12a44b.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hid-sensor-hub.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index 0408421d885f..cd224dfd94d8 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h @@ -230,6 +230,7 @@ struct hid_sensor_common { struct platform_device *pdev; unsigned usage_id; atomic_t data_ready; + atomic_t user_requested_state; struct iio_trigger *trigger; struct hid_sensor_hub_attribute_info poll; struct hid_sensor_hub_attribute_info report_state; |