All of lore.kernel.org
 help / color / mirror / Atom feed
* System suspend states and device driver suspend() callback
@ 2013-08-16  8:06 Li Yang
  2013-08-16 10:57 ` Arend van Spriel
  2013-08-16 11:32 ` Rafael J. Wysocki
  0 siblings, 2 replies; 7+ messages in thread
From: Li Yang @ 2013-08-16  8:06 UTC (permalink / raw)
  To: linux-pm, lkml; +Cc: Rafael J. Wysocki

Hi Guys,

Is there a standard way for the device drivers to know if the system
is going to “standby” mode or “mem” mode when the suspend() callbacks
are called?

Regards,

Leo

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

* Re: System suspend states and device driver suspend() callback
  2013-08-16  8:06 System suspend states and device driver suspend() callback Li Yang
@ 2013-08-16 10:57 ` Arend van Spriel
  2013-08-16 11:32 ` Rafael J. Wysocki
  1 sibling, 0 replies; 7+ messages in thread
From: Arend van Spriel @ 2013-08-16 10:57 UTC (permalink / raw)
  To: Li Yang; +Cc: linux-pm, lkml, Rafael J. Wysocki

On 08/16/2013 10:06 AM, Li Yang wrote:
> Hi Guys,
>
> Is there a standard way for the device drivers to know if the system
> is going to “standby” mode or “mem” mode when the suspend() callbacks
> are called?

what about implementing struct device_driver::suspend?

This is for driver level suspend operation, so not per-device.

> Regards,
>
> Leo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



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

* Re: System suspend states and device driver suspend() callback
  2013-08-16  8:06 System suspend states and device driver suspend() callback Li Yang
  2013-08-16 10:57 ` Arend van Spriel
@ 2013-08-16 11:32 ` Rafael J. Wysocki
  2013-08-16 17:13     ` Li Yang-R58472
  1 sibling, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-08-16 11:32 UTC (permalink / raw)
  To: Li Yang; +Cc: linux-pm, lkml

On Friday, August 16, 2013 04:06:26 PM Li Yang wrote:
> Hi Guys,
> 
> Is there a standard way for the device drivers to know if the system
> is going to “standby” mode or “mem” mode when the suspend() callbacks
> are called?

No, there's none.

What do you need that for?

Rafael


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

* Re: System suspend states and device driver suspend() callback
  2013-08-16 11:32 ` Rafael J. Wysocki
@ 2013-08-16 17:13     ` Li Yang-R58472
  0 siblings, 0 replies; 7+ messages in thread
From: Li Yang-R58472 @ 2013-08-16 17:13 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, lkml

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 891 bytes --]



ÔÚ 2013-8-16£¬ÏÂÎç7:22£¬"Rafael J. Wysocki" <rjw@sisk.pl> дµÀ£º

> On Friday, August 16, 2013 04:06:26 PM Li Yang wrote:
>> Hi Guys,
>> 
>> Is there a standard way for the device drivers to know if the system
>> is going to ¡°standby¡± mode or ¡°mem¡± mode when the suspend() callbacks
>> are called?
> 
> No, there's none.
> 
> What do you need that for?

Some chips like ours are putting the on-chip devices into different low power states when entering different system low power states.  When we enter system standby, on-chip devices are clock gated.  While entering suspend to ram, on-chip devices are power gated.  We want to driver to act differently too when entering different suspend states.

- Leo

> 
> Rafael
> 
> 
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

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

* Re: System suspend states and device driver suspend() callback
@ 2013-08-16 17:13     ` Li Yang-R58472
  0 siblings, 0 replies; 7+ messages in thread
From: Li Yang-R58472 @ 2013-08-16 17:13 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, lkml



在 2013-8-16,下午7:22,"Rafael J. Wysocki" <rjw@sisk.pl> 写道:

> On Friday, August 16, 2013 04:06:26 PM Li Yang wrote:
>> Hi Guys,
>> 
>> Is there a standard way for the device drivers to know if the system
>> is going to “standby” mode or “mem” mode when the suspend() callbacks
>> are called?
> 
> No, there's none.
> 
> What do you need that for?

Some chips like ours are putting the on-chip devices into different low power states when entering different system low power states.  When we enter system standby, on-chip devices are clock gated.  While entering suspend to ram, on-chip devices are power gated.  We want to driver to act differently too when entering different suspend states.

- Leo

> 
> Rafael
> 
> 

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

* Re: System suspend states and device driver suspend() callback
  2013-08-16 17:13     ` Li Yang-R58472
  (?)
@ 2013-08-16 23:53     ` Rafael J. Wysocki
  2013-08-26  8:50       ` Li Yang
  -1 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-08-16 23:53 UTC (permalink / raw)
  To: Li Yang-R58472; +Cc: linux-pm, lkml

On Friday, August 16, 2013 05:13:42 PM Li Yang-R58472 wrote:
> 
> 在 2013-8-16,下午7:22,"Rafael J. Wysocki" <rjw@sisk.pl> 写道:
> 
> > On Friday, August 16, 2013 04:06:26 PM Li Yang wrote:
> >> Hi Guys,
> >> 
> >> Is there a standard way for the device drivers to know if the system
> >> is going to “standby” mode or “mem” mode when the suspend() callbacks
> >> are called?
> > 
> > No, there's none.
> > 
> > What do you need that for?
> 
> Some chips like ours are putting the on-chip devices into different low
> power states when entering different system low power states.  When we enter
> system standby, on-chip devices are clock gated.  While entering suspend to
> ram, on-chip devices are power gated.  We want to driver to act differently
> too when entering different suspend states.

Can you possibly use platform suspend operations to implement that (in analogy
with ACPI suspend operations)?

Rafael


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

* Re: System suspend states and device driver suspend() callback
  2013-08-16 23:53     ` Rafael J. Wysocki
@ 2013-08-26  8:50       ` Li Yang
  0 siblings, 0 replies; 7+ messages in thread
From: Li Yang @ 2013-08-26  8:50 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Li Yang-R58472, linux-pm, lkml

On Sat, Aug 17, 2013 at 7:53 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Friday, August 16, 2013 05:13:42 PM Li Yang-R58472 wrote:
>>
>> 在 2013-8-16,下午7:22,"Rafael J. Wysocki" <rjw@sisk.pl> 写道:
>>
>> > On Friday, August 16, 2013 04:06:26 PM Li Yang wrote:
>> >> Hi Guys,
>> >>
>> >> Is there a standard way for the device drivers to know if the system
>> >> is going to “standby” mode or “mem” mode when the suspend() callbacks
>> >> are called?
>> >
>> > No, there's none.
>> >
>> > What do you need that for?
>>
>> Some chips like ours are putting the on-chip devices into different low
>> power states when entering different system low power states.  When we enter
>> system standby, on-chip devices are clock gated.  While entering suspend to
>> ram, on-chip devices are power gated.  We want to driver to act differently
>> too when entering different suspend states.
>
> Can you possibly use platform suspend operations to implement that (in analogy
> with ACPI suspend operations)?

I agree it's best to get the state that the device will be in during
suspend from the platform code.  Will it be better to have a standard
interface to pass this information?  Given the fact that a single
device can be used by different platforms even different architecture
nowadays.  How about exposing some new callbacks from the
platform_suspend_ops for the driver to use?

Regards,
Leo

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

end of thread, other threads:[~2013-08-26  8:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-16  8:06 System suspend states and device driver suspend() callback Li Yang
2013-08-16 10:57 ` Arend van Spriel
2013-08-16 11:32 ` Rafael J. Wysocki
2013-08-16 17:13   ` Li Yang-R58472
2013-08-16 17:13     ` Li Yang-R58472
2013-08-16 23:53     ` Rafael J. Wysocki
2013-08-26  8:50       ` Li Yang

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.