LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Enable async suspend/resume on industrial IO devices
@ 2011-04-06  2:45 Sonny Rao
  2011-04-06 10:59 ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Sonny Rao @ 2011-04-06  2:45 UTC (permalink / raw)
  To: jic23
  Cc: linux-pm, bleung, snanda, Sonny Rao, Greg Kroah-Hartman,
	Manuel Stahl, Andrew Morton, Phillip Kurtenbach, devel,
	linux-kernel

Industrial I/O devices can sometimes take a long time to resume,
allowing them to be asynchronus saves 50ms on one light sensor

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>

---
 drivers/staging/iio/industrialio-core.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 768f448..a4b099f 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -811,6 +811,8 @@ int iio_device_register(struct iio_dev *dev_info)
 	if (dev_info->modes & INDIO_RING_TRIGGERED)
 		iio_device_register_trigger_consumer(dev_info);
 
+	device_enable_async_suspend(&dev_info->dev);
+
 	return 0;
 
 error_free_sysfs:
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable async suspend/resume on industrial IO devices
  2011-04-06  2:45 [PATCH] Enable async suspend/resume on industrial IO devices Sonny Rao
@ 2011-04-06 10:59 ` Jonathan Cameron
  2011-04-06 22:47   ` Sonny Rao
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2011-04-06 10:59 UTC (permalink / raw)
  To: Sonny Rao
  Cc: linux-pm, bleung, snanda, Greg Kroah-Hartman, Manuel Stahl,
	Andrew Morton, Phillip Kurtenbach, devel, linux-kernel,
	linux-iio

On 04/06/11 03:45, Sonny Rao wrote:
> Industrial I/O devices can sometimes take a long time to resume,
> allowing them to be asynchronus saves 50ms on one light sensor
> 
Hi Sonny,

cc'd linux-iio

I'm not particularly familiar with this.  Are there any disadvantages?
I just wonder if it would be better to push this into individual drivers
rather than the core?

Jonathan
> Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
> 
> ---
>  drivers/staging/iio/industrialio-core.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 768f448..a4b099f 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -811,6 +811,8 @@ int iio_device_register(struct iio_dev *dev_info)
>  	if (dev_info->modes & INDIO_RING_TRIGGERED)
>  		iio_device_register_trigger_consumer(dev_info);
>  
> +	device_enable_async_suspend(&dev_info->dev);
> +
>  	return 0;
>  
>  error_free_sysfs:


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable async suspend/resume on industrial IO devices
  2011-04-06 10:59 ` Jonathan Cameron
@ 2011-04-06 22:47   ` Sonny Rao
  2011-04-07 11:29     ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Sonny Rao @ 2011-04-06 22:47 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-pm, bleung, snanda, Greg Kroah-Hartman, Manuel Stahl,
	Andrew Morton, Phillip Kurtenbach, devel, linux-kernel,
	linux-iio

On Wed, Apr 6, 2011 at 3:59 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
> On 04/06/11 03:45, Sonny Rao wrote:
>> Industrial I/O devices can sometimes take a long time to resume,
>> allowing them to be asynchronus saves 50ms on one light sensor
>>
> Hi Sonny,
>
> cc'd linux-iio
>
> I'm not particularly familiar with this.  Are there any disadvantages?
> I just wonder if it would be better to push this into individual drivers
> rather than the core?

Yeah we could do it that way too, I sent out a similar patch for i2c
and people were asking if it was entirely safe.  It sounds like it may
depend on dependencies between devices.

Do you know if any of the devices in iio have inter-device dependencies?
I was under the impression they were mostly stand-alone sensors that
ordinarily wouldn't, but I haven't tried to audit all of them or anything.

Sonny

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable async suspend/resume on industrial IO devices
  2011-04-06 22:47   ` Sonny Rao
@ 2011-04-07 11:29     ` Jonathan Cameron
  2011-04-08  3:26       ` Sonny Rao
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Cameron @ 2011-04-07 11:29 UTC (permalink / raw)
  To: Sonny Rao
  Cc: linux-pm, bleung, snanda, Greg Kroah-Hartman, Manuel Stahl,
	Andrew Morton, Phillip Kurtenbach, devel, linux-kernel,
	linux-iio

On 04/06/11 23:47, Sonny Rao wrote:
> On Wed, Apr 6, 2011 at 3:59 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
>> On 04/06/11 03:45, Sonny Rao wrote:
>>> Industrial I/O devices can sometimes take a long time to resume,
>>> allowing them to be asynchronus saves 50ms on one light sensor
>>>
>> Hi Sonny,
>>
>> cc'd linux-iio
>>
>> I'm not particularly familiar with this.  Are there any disadvantages?
>> I just wonder if it would be better to push this into individual drivers
>> rather than the core?
> 
> Yeah we could do it that way too, I sent out a similar patch for i2c
> and people were asking if it was entirely safe.  It sounds like it may
> depend on dependencies between devices.
> 
> Do you know if any of the devices in iio have inter-device dependencies?
> I was under the impression they were mostly stand-alone sensors that
> ordinarily wouldn't, but I haven't tried to audit all of them or anything.
Mostly I think is the key word here.  Right now I don't think we have anything
that would have a problem, but putting something like that in the core is
liable to bite sometime in the future.  For now at least I think I'd prefer
to see it in an individual driver.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Enable async suspend/resume on industrial IO devices
  2011-04-07 11:29     ` Jonathan Cameron
@ 2011-04-08  3:26       ` Sonny Rao
  0 siblings, 0 replies; 5+ messages in thread
From: Sonny Rao @ 2011-04-08  3:26 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-pm, bleung, snanda, Greg Kroah-Hartman, Manuel Stahl,
	Andrew Morton, Phillip Kurtenbach, devel, linux-kernel,
	linux-iio

On Thu, Apr 7, 2011 at 4:29 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
> On 04/06/11 23:47, Sonny Rao wrote:
>> On Wed, Apr 6, 2011 at 3:59 AM, Jonathan Cameron <jic23@cam.ac.uk> wrote:
>>> On 04/06/11 03:45, Sonny Rao wrote:
>>>> Industrial I/O devices can sometimes take a long time to resume,
>>>> allowing them to be asynchronus saves 50ms on one light sensor
>>>>
>>> Hi Sonny,
>>>
>>> cc'd linux-iio
>>>
>>> I'm not particularly familiar with this.  Are there any disadvantages?
>>> I just wonder if it would be better to push this into individual drivers
>>> rather than the core?
>>
>> Yeah we could do it that way too, I sent out a similar patch for i2c
>> and people were asking if it was entirely safe.  It sounds like it may
>> depend on dependencies between devices.
>>
>> Do you know if any of the devices in iio have inter-device dependencies?
>> I was under the impression they were mostly stand-alone sensors that
>> ordinarily wouldn't, but I haven't tried to audit all of them or anything.
> Mostly I think is the key word here.  Right now I don't think we have anything
> that would have a problem, but putting something like that in the core is
> liable to bite sometime in the future.  For now at least I think I'd prefer
> to see it in an individual driver.
>
Ok sure, FYI, I had a similar discussion with the i2c folks and I
think the consensus was to do it per-driver as well.
The driver I was interested in was the tsl258x which isn't in staging
yet.  When it goes in, I shall submit my patch on top of that.


Thanks,
Sonny

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-08  3:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06  2:45 [PATCH] Enable async suspend/resume on industrial IO devices Sonny Rao
2011-04-06 10:59 ` Jonathan Cameron
2011-04-06 22:47   ` Sonny Rao
2011-04-07 11:29     ` Jonathan Cameron
2011-04-08  3:26       ` Sonny Rao

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).