linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Prevent PM suspend from powering off the domain for non-wakeup in-use devices
@ 2023-07-06  3:06 Ajay Agarwal
  2023-07-07 14:49 ` Ulf Hansson
  0 siblings, 1 reply; 9+ messages in thread
From: Ajay Agarwal @ 2023-07-06  3:06 UTC (permalink / raw)
  To: Rafael J. Wysocki, Kevin Hilman, Ulf Hansson, Pavel Machek,
	Len Brown
  Cc: linux-pm, manugautam, mshavit, quangh

Hello Linux PM experts
I have a question on PM domain. As per the current PM domain driver design, the genpd_finish_suspend turns OFF a power domain if it is not already turned OFF by runtime suspend.

I have a usecase of a device having to stay ON during system suspend. This device will be used by a co-processor which is running its own OS. Thereby, it requires the power domain to stay turned ON, so genpd_finish_suspend should not be powering down the domain.

I studied the code and found the flag `GENPD_FLAG_ACTIVE_WAKEUP` which can be set for the power domain. And device_set_wakeup_path can be invoked in the suspend() callback of the device. Together, these will prevent the genpd_finish_suspend from turning OFF the domain. See: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/power/domain.c#n1260

But this flag is really intended to be used for devices which are capable of waking up the system from PM suspend. But my usecase does not involve a scenario of the device potentially waking up the system, it just needs to stay powered for the co-processor to be able to use it.

Can you suggest if I should go ahead with using the existing framework of `GENPD_FLAG_ACTIVE_WAKEUP`? Or add a new flag, say `GENPD_FLAG_RPM_ONLY` for this scenario?

Thanks
Ajay

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

end of thread, other threads:[~2023-08-11  8:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06  3:06 Prevent PM suspend from powering off the domain for non-wakeup in-use devices Ajay Agarwal
2023-07-07 14:49 ` Ulf Hansson
2023-07-07 16:41   ` Manivannan Sadhasivam
2023-07-10 17:59     ` Ajay Agarwal
2023-07-13 14:30       ` Ulf Hansson
2023-07-31 12:27         ` Michael Shavit
2023-08-10 15:56           ` Ulf Hansson
2023-08-10 18:00             ` Michael Shavit
2023-08-11  8:33               ` Ulf Hansson

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