All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Srinivas Pandruvada
	<srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: jkosina-AlSwsSmVLrQ@public.gmane.org,
	holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org
Subject: Re: [PATCH 2/3] IIO: call sensor hub open close function
Date: Tue, 01 Oct 2013 09:42:31 +0100	[thread overview]
Message-ID: <524A8AF7.8030304@kernel.org> (raw)
In-Reply-To: <1379524399-16995-2-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

On 09/18/13 18:13, Srinivas Pandruvada wrote:
> Call hid_sensor_hub_device_open when user space opens device and call
> hid_sensor_hub_device_close when device is closed. This helps in
> saving power.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Applied to the togreg branch of iio.git

Thanks,
> ---
>  drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> index 87419c4..b6e77e0 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> @@ -34,6 +34,12 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
>  	struct hid_sensor_common *st = iio_trigger_get_drvdata(trig);
>  	int state_val;
>  
> +	if (state) {
> +		if (sensor_hub_device_open(st->hsdev))
> +			return -EIO;
> +	} else
> +		sensor_hub_device_close(st->hsdev);
> +
>  	state_val = state ? 1 : 0;
>  	if (IS_ENABLED(CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS))
>  		++state_val;
> 

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	linux-input@vger.kernel.org, linux-iio@vger.kernel.org
Cc: jkosina@suse.cz, holler@ahsoftware.de
Subject: Re: [PATCH 2/3] IIO: call sensor hub open close function
Date: Tue, 01 Oct 2013 09:42:31 +0100	[thread overview]
Message-ID: <524A8AF7.8030304@kernel.org> (raw)
In-Reply-To: <1379524399-16995-2-git-send-email-srinivas.pandruvada@linux.intel.com>

On 09/18/13 18:13, Srinivas Pandruvada wrote:
> Call hid_sensor_hub_device_open when user space opens device and call
> hid_sensor_hub_device_close when device is closed. This helps in
> saving power.
> 
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Applied to the togreg branch of iio.git

Thanks,
> ---
>  drivers/iio/common/hid-sensors/hid-sensor-trigger.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> index 87419c4..b6e77e0 100644
> --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
> @@ -34,6 +34,12 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig,
>  	struct hid_sensor_common *st = iio_trigger_get_drvdata(trig);
>  	int state_val;
>  
> +	if (state) {
> +		if (sensor_hub_device_open(st->hsdev))
> +			return -EIO;
> +	} else
> +		sensor_hub_device_close(st->hsdev);
> +
>  	state_val = state ? 1 : 0;
>  	if (IS_ENABLED(CONFIG_HID_SENSOR_ENUM_BASE_QUIRKS))
>  		++state_val;
> 

  parent reply	other threads:[~2013-10-01  8:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 17:13 [PATCH 1/3] HID: Delay opening HID device Srinivas Pandruvada
     [not found] ` <1379524399-16995-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-09-18 17:13   ` [PATCH 2/3] IIO: call sensor hub open close function Srinivas Pandruvada
2013-09-18 17:13     ` Srinivas Pandruvada
     [not found]     ` <1379524399-16995-2-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-01  8:42       ` Jonathan Cameron [this message]
2013-10-01  8:42         ` Jonathan Cameron
2013-09-18 17:13   ` [PATCH 3/3] HID RTC: Open sensor hub open close Srinivas Pandruvada
2013-09-18 17:13     ` Srinivas Pandruvada
     [not found]     ` <1379524399-16995-3-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-10-01  8:42       ` Jonathan Cameron
2013-10-01  8:42         ` Jonathan Cameron
2013-10-01 16:31         ` Srinivas Pandruvada
2013-09-18 20:39   ` [PATCH 1/3] HID: Delay opening HID device Jonathan Cameron
2013-09-18 20:39     ` Jonathan Cameron
2013-09-24  9:32   ` Jiri Kosina
2013-09-24  9:32     ` Jiri Kosina
2013-10-01  8:42     ` Jonathan Cameron
  -- strict thread matches above, loose matches on Subject: below --
2013-09-10 20:03 Srinivas Pandruvada
2013-09-10 20:03 ` [PATCH 2/3] IIO: call sensor hub open close function Srinivas Pandruvada

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=524A8AF7.8030304@kernel.org \
    --to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org \
    --cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.