aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorArchana Patni <archana.patni@linux.intel.com>2014-05-19 07:19:00 -0400
committerJonathan Cameron <jic23@kernel.org>2014-05-29 12:38:33 -0400
commitc0a36f08f4241538368c0ceafd0aa07a0e57b47e (patch)
treef5d23996911c2936a6aad085f46a6e90c9bb2784 /drivers/iio
parent86281966c7395aa9a13a20c52e26005f5e142451 (diff)
iio: hid-sensors: Get feature report from sensor hub after changing power state
Some sensor hubs require a get feature report call to be issued soon after changing the power state of the sensor. Without this, the sensor remains in the current state. This patch adds a call soon after the power state. This is retained as a generic call across all sensor hubs since the behavior has been noticed on more than one implementation. Signed-off-by: Archana Patni <archana.patni@intel.com> Signed-off-by: Subramony Sesha <subramony.sesha@intel.com> Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index dbefbdaf7cd1..f26f52d7c46f 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -73,6 +73,9 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
73 (s32)report_val); 73 (s32)report_val);
74 } 74 }
75 75
76 sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
77 st->power_state.index,
78 &state_val);
76 return 0; 79 return 0;
77} 80}
78 81