Skip to content
Commit 5d9854ea authored by Srinivas Pandruvada's avatar Srinivas Pandruvada Committed by Jonathan Cameron
Browse files

iio: hid-sensor: Store restore poll and hysteresis on S3

This change undo the change done by 'commit 3bec2474
("iio: hid-sensor-trigger: Change get poll value function order to avoid
sensor properties losing after resume from S3")' as this breaks some
USB/i2c sensor hubs.

Instead of relying on HW for restoring poll and hysteresis, driver stores
and restores on resume (S3). In this way user space modified settings are
not lost for any kind of sensor hub behavior.

In this change, whenever user space modifies sampling frequency or
hysteresis driver will get the feature value from the hub and store in the
per device hid_sensor_common data structure. On resume callback from S3,
system will set the feature to sensor hub, if user space ever modified the
feature value.

Fixes: 3bec2474

 ("iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3")
Reported-by: default avatarRitesh Raj Sarraf <rrs@researchut.com>
Tested-by: default avatarRitesh Raj Sarraf <rrs@researchut.com>
Tested-by: default avatarSong, Hongyan <hongyan.song@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent a6d36140
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment