linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Drivers taking different actions depending on sleep state
@ 2017-06-09 15:20 Mason
  2017-06-09 16:27 ` Mason
                   ` (2 more replies)
  0 siblings, 3 replies; 59+ messages in thread
From: Mason @ 2017-06-09 15:20 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I read the "Sleep States" documentation:
https://www.kernel.org/doc/Documentation/power/states.txt

It mentions /sys/power/mem_sleep but I don't have that in 4.9
# ll /sys/power/
-rw-r--r--    1 root     root          4096 Jan  1 00:31 pm_async
-rw-r--r--    1 root     root          4096 Jan  1 00:31 pm_freeze_timeout
-rw-r--r--    1 root     root          4096 Jan  1 00:31 state
-rw-r--r--    1 root     root          4096 Jan  1 00:31 wakeup_count

# cat /sys/power/state 
freeze mem

Currently my platform's "mem" is a true suspend-to-RAM trigger,
where drivers are supposed to save their state (register values
will be lost), then Linux hands control over to firmware which
enables RAM self-refresh and powers the chip down. When the system
resumes, drivers restore their state from their copy in memory.

One driver is responsible for loading/unloading microcode running
on the DSPs. This operation is required only when powering down
the chip, but it should be avoided for "low-latency" sleeps.

The problem is that, if I understand correctly, drivers have no way
of knowing which sleep state is being entered/exited?

How can I have the microcode driver take different decisions
based on the sleep state?

Regards.

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

end of thread, other threads:[~2017-07-24 20:55 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-09 15:20 Drivers taking different actions depending on sleep state Mason
2017-06-09 16:27 ` Mason
2017-06-09 21:30   ` Pavel Machek
2017-06-10  9:16     ` Mason
2017-06-09 22:05 ` Florian Fainelli
2017-06-09 22:53 ` Rafael J. Wysocki
2017-06-21 21:16   ` Florian Fainelli
2017-06-21 21:59     ` Rafael J. Wysocki
2017-06-21 22:48       ` Florian Fainelli
2017-06-21 22:57         ` Rafael J. Wysocki
2017-06-21 23:55           ` Florian Fainelli
2017-06-22  0:03             ` Rafael J. Wysocki
2017-06-22 15:18               ` Florian Fainelli
2017-06-22 16:09                 ` Rafael J. Wysocki
2017-06-22  8:51             ` Alexandre Belloni
2017-06-22 16:00               ` Rafael J. Wysocki
2017-06-23  1:08               ` [RFC 0/2] PM / suspend: Add platform_suspend_target_state() Florian Fainelli
2017-06-23  1:08                 ` [RFC 1/2] " Florian Fainelli
2017-06-29 23:00                   ` Rafael J. Wysocki
2017-07-12 18:08                     ` Florian Fainelli
2017-07-14 22:16                       ` Rafael J. Wysocki
2017-07-15  6:28                         ` Pavel Machek
2017-07-15 12:17                           ` Rafael J. Wysocki
2017-07-15 16:46                             ` Pavel Machek
2017-07-15 17:20                               ` Florian Fainelli
2017-07-15 18:33                                 ` Alexandre Belloni
2017-07-06  3:18                                   ` Pavel Machek
2017-07-16 13:41                                     ` Alexandre Belloni
2017-07-16 15:35                                       ` Florian Fainelli
2017-07-15 23:24                                 ` Rafael J. Wysocki
2017-07-15 23:34                                   ` Mason
2017-07-15 23:38                                     ` Rafael J. Wysocki
2017-07-16  2:36                                       ` Florian Fainelli
2017-07-16 10:22                                         ` Rafael J. Wysocki
2017-07-16 13:38                                           ` Alexandre Belloni
2017-07-16 18:24                                             ` Pavel Machek
2017-07-16 15:41                                           ` Florian Fainelli
2017-07-15 23:29                               ` Rafael J. Wysocki
2017-07-06  3:17                                 ` Pavel Machek
2017-07-16 10:28                                   ` Rafael J. Wysocki
2017-07-16 18:22                                     ` Pavel Machek
2017-06-23  1:08                 ` [RFC 2/2] soc: bcm: brcmstb: PM: Implement target_state callback Florian Fainelli
2017-06-29 23:04                   ` Rafael J. Wysocki
2017-07-16  2:36                 ` [PATCH 0/2] PM / suspend: Add platform_suspend_target_state() Florian Fainelli
2017-07-16  2:36                   ` [PATCH 1/2] " Florian Fainelli
2017-07-06  3:18                     ` Pavel Machek
2017-07-16 15:41                       ` Florian Fainelli
2017-07-16 10:30                     ` Rafael J. Wysocki
2017-07-16  2:36                   ` [PATCH 2/2] soc: bcm: brcmstb: PM: Implement target_state callback Florian Fainelli
2017-07-17 20:06                   ` [PATCH v2] PM / suspend: Add suspend_target_state() Florian Fainelli
2017-07-17 20:16                     ` Pavel Machek
2017-07-17 21:03                       ` Rafael J. Wysocki
2017-07-17 21:21                         ` Florian Fainelli
2017-07-20  8:03                     ` Pavel Machek
2017-07-17 22:10                   ` [PATCH v3] PM / suspend: Export pm_suspend_target_state Florian Fainelli
2017-07-17 23:24                     ` Rafael J. Wysocki
2017-07-18  0:19                     ` [PATCH v4] " Florian Fainelli
2017-07-24 20:55                       ` Rafael J. Wysocki
2017-07-13 12:03               ` Drivers taking different actions depending on sleep state Pavel Machek

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