linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] pmdomain: Add generic ->sync_state() support to genpd
@ 2025-04-17 14:24 Ulf Hansson
  2025-04-17 14:24 ` [PATCH 01/11] pmdomain: core: Convert genpd_power_off() to void Ulf Hansson
                   ` (12 more replies)
  0 siblings, 13 replies; 33+ messages in thread
From: Ulf Hansson @ 2025-04-17 14:24 UTC (permalink / raw)
  To: Saravana Kannan, Stephen Boyd, linux-pm
  Cc: Rafael J . Wysocki, Greg Kroah-Hartman, Michael Grzeschik,
	Bjorn Andersson, Abel Vesa, Devarsh Thakkar, Peng Fan,
	Tomi Valkeinen, Johan Hovold, Maulik Shah, Ulf Hansson,
	linux-arm-kernel, linux-kernel

If a PM domain (genpd) is powered-on during boot, there is probably a good
reason for it. Therefore it's known to be a bad idea to allow such genpd to be
powered-off before all of its consumer devices have been probed. This series
intends to fix this problem.

We have been discussing these issues at LKML and at various Linux-conferences
in the past. I have therefore tried to include the people I can recall being
involved, but I may have forgotten some (my apologies), feel free to loop them
in.

A few notes:
*)
Even if this looks good, the last patch can't go in without some additional
changes to a couple of existing genpd provider drivers. Typically genpd provider
drivers that implements ->sync_state() need to call of_genpd_sync_state(), but I
will fix this asap, if we think the series makes sense.

*)
Patch 1 -> 3 are just preparatory cleanups. 

*)
I have tested this with QEMU with a bunch of local test-drivers and DT nodes.
Let me know if you want me to share this code too.


Please help review and test!
Finally, a big thanks to Saravana for all the support!

Kind regards
Ulf Hansson


Saravana Kannan (1):
  driver core: Add dev_set_drv_sync_state()

Ulf Hansson (10):
  pmdomain: core: Convert genpd_power_off() to void
  pmdomain: core: Simplify return statement in genpd_power_off()
  pmdomain: core: Use genpd->opp_table to simplify error/remove path
  pmdomain: core: Add a bus and a driver for genpd providers
  pmdomain: core: Use device_set_node() to assign the fwnode too
  pmdomain: core: Add the genpd->dev to the genpd provider bus
  pmdomain: core: Export a common ->sync_state() helper for genpd
    providers
  pmdomain: core: Add internal ->sync_state() support for genpd
    providers
  pmdomain: core: Default to use of_genpd_sync_state() for genpd
    providers
  pmdomain: core: Leave powered-on genpds on until ->sync_state()

 drivers/pmdomain/core.c   | 273 +++++++++++++++++++++++++++++++-------
 include/linux/device.h    |  12 ++
 include/linux/pm_domain.h |  11 ++
 3 files changed, 249 insertions(+), 47 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2025-05-08 10:08 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17 14:24 [PATCH 00/11] pmdomain: Add generic ->sync_state() support to genpd Ulf Hansson
2025-04-17 14:24 ` [PATCH 01/11] pmdomain: core: Convert genpd_power_off() to void Ulf Hansson
2025-04-22 13:27   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 02/11] pmdomain: core: Simplify return statement in genpd_power_off() Ulf Hansson
2025-04-22 13:28   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 03/11] pmdomain: core: Use genpd->opp_table to simplify error/remove path Ulf Hansson
2025-04-22 13:33   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 04/11] pmdomain: core: Add a bus and a driver for genpd providers Ulf Hansson
2025-04-22 14:02   ` Abel Vesa
2025-04-23  7:34     ` Ulf Hansson
2025-04-17 14:25 ` [PATCH 05/11] pmdomain: core: Use device_set_node() to assign the fwnode too Ulf Hansson
2025-04-17 20:55   ` Saravana Kannan
2025-04-23  7:30     ` Ulf Hansson
2025-04-22 14:04   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 06/11] pmdomain: core: Add the genpd->dev to the genpd provider bus Ulf Hansson
2025-04-22 14:06   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 07/11] pmdomain: core: Export a common ->sync_state() helper for genpd providers Ulf Hansson
2025-04-22 14:10   ` Abel Vesa
2025-05-07 16:23   ` Dan Carpenter
2025-05-08 10:05     ` Ulf Hansson
2025-04-17 14:25 ` [PATCH 08/11] pmdomain: core: Add internal ->sync_state() support " Ulf Hansson
2025-04-18  0:23   ` Saravana Kannan
2025-04-23  7:58     ` Ulf Hansson
2025-04-17 14:25 ` [PATCH 09/11] driver core: Add dev_set_drv_sync_state() Ulf Hansson
2025-04-22 14:15   ` Abel Vesa
2025-04-17 14:25 ` [PATCH 10/11] pmdomain: core: Default to use of_genpd_sync_state() for genpd providers Ulf Hansson
2025-04-18  0:29   ` Saravana Kannan
2025-04-17 14:25 ` [PATCH 11/11] pmdomain: core: Leave powered-on genpds on until ->sync_state() Ulf Hansson
2025-04-18  0:50   ` Saravana Kannan
2025-04-23  7:46     ` Ulf Hansson
2025-04-18  0:53 ` [PATCH 00/11] pmdomain: Add generic ->sync_state() support to genpd Saravana Kannan
2025-04-24 10:59 ` Tomi Valkeinen
2025-04-25 12:17   ` 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).