Skip to content

Commit

Permalink
iio: hid-sensors: Get feature report from sensor hub after changing p…
Browse files Browse the repository at this point in the history
…ower 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>
  • Loading branch information
Archana Patni authored and Jonathan Cameron committed May 29, 2014
1 parent 8628196 commit c0a36f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/iio/common/hid-sensors/hid-sensor-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
(s32)report_val);
}

sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
st->power_state.index,
&state_val);
return 0;
}

Expand Down

0 comments on commit c0a36f0

Please sign in to comment.