[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250417142513.312939-1-ulf.hansson@linaro.org>
Date: Thu, 17 Apr 2025 16:24:58 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Saravana Kannan <saravanak@...gle.com>,
Stephen Boyd <sboyd@...nel.org>,
linux-pm@...r.kernel.org
Cc: "Rafael J . Wysocki" <rafael@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Michael Grzeschik <m.grzeschik@...gutronix.de>,
Bjorn Andersson <andersson@...nel.org>,
Abel Vesa <abel.vesa@...aro.org>,
Devarsh Thakkar <devarsht@...v0571a.ent.ti.com>,
Peng Fan <peng.fan@....nxp.com>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Johan Hovold <johan@...nel.org>,
Maulik Shah <maulik.shah@....qualcomm.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 00/11] pmdomain: Add generic ->sync_state() support to genpd
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
Powered by blists - more mailing lists