linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Archana Patni <archana.patni@linux.intel.com>
Cc: jkosina@suse.cz, linux-iio@vger.kernel.org,
	srinivas.pandruvada@intel.com,
	Archana Patni <archana.patni@intel.com>,
	Subramony Sesha <subramony.sesha@intel.com>
Subject: Re: [PATCH] iio: hid-sensors: Get feature report from sensor hub after changing power state
Date: Sat, 24 May 2014 11:46:07 +0100	[thread overview]
Message-ID: <5380786F.9090402@kernel.org> (raw)
In-Reply-To: <1400498363-18456-1-git-send-email-archana.patni@linux.intel.com>

On 19/05/14 12:19, Archana Patni wrote:
> 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>
As this isn't a regression (never worked) I've applied it to the
togreg branch of iio.git.

Thanks,

Jonathan
> ---
>   .../iio/common/hid-sensors/hid-sensor-trigger.c    |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> index dbefbda..f26f52d 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,
>   					(s32)report_val);
>   	}
>
> +	sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
> +					st->power_state.index,
> +					&state_val);
>   	return 0;
>   }
>
>


      reply	other threads:[~2014-05-24 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19 11:19 [PATCH] iio: hid-sensors: Get feature report from sensor hub after changing power state Archana Patni
2014-05-24 10:46 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5380786F.9090402@kernel.org \
    --to=jic23@kernel.org \
    --cc=archana.patni@intel.com \
    --cc=archana.patni@linux.intel.com \
    --cc=jkosina@suse.cz \
    --cc=linux-iio@vger.kernel.org \
    --cc=srinivas.pandruvada@intel.com \
    --cc=subramony.sesha@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).