* [PATCH 0/3] pmdomain: ti/core: Miscellaneous cleanups
@ 2026-11-19 13:22 Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 1/3] pmdomain: ti: omap_prm: Use pm_clk_no_clocks() Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:22 UTC (permalink / raw)
To: Nishanth Menon, Santosh Shilimkar, Tero Kristo, Kevin Hilman,
Tony Lindgren, Ulf Hansson, Rafael J . Wysocki
Cc: linux-arm-kernel, linux-pm, linux-kernel, Geert Uytterhoeven
Hi all,
This patch series contains two cleanups for the TI OMAP2+ PRM driver,
and removes a now-unused generic_pm_domain_data member.
This has been tested on BeagleBone Black.
Thanks for your comments!
Geert Uytterhoeven (3):
pmdomain: ti: omap_prm: Use pm_clk_no_clocks()
pmdomain: ti: omap_prm: Remove dummy generic_pm_domain_data handling
pmdomain: core: Remove unused generic_pm_domain_data.data
drivers/pmdomain/ti/omap_prm.c | 15 +--------------
include/linux/pm_domain.h | 1 -
2 files changed, 1 insertion(+), 15 deletions(-)
--
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] pmdomain: ti: omap_prm: Use pm_clk_no_clocks()
2026-11-19 13:22 [PATCH 0/3] pmdomain: ti/core: Miscellaneous cleanups Geert Uytterhoeven
@ 2026-11-19 13:22 ` Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 2/3] pmdomain: ti: omap_prm: Remove dummy generic_pm_domain_data handling Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 3/3] pmdomain: core: Remove unused generic_pm_domain_data.data Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:22 UTC (permalink / raw)
To: Nishanth Menon, Santosh Shilimkar, Tero Kristo, Kevin Hilman,
Tony Lindgren, Ulf Hansson, Rafael J . Wysocki
Cc: linux-arm-kernel, linux-pm, linux-kernel, Geert Uytterhoeven
The TI OMAP2+ PRM driver uses a flag to keep track if any device clocks
were registered for power management. Replace this custom logic by use
of the existing pm_clk_no_clocks() helper.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/pmdomain/ti/omap_prm.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/pmdomain/ti/omap_prm.c b/drivers/pmdomain/ti/omap_prm.c
index 671b028e367eb9de..9515420da890cb31 100644
--- a/drivers/pmdomain/ti/omap_prm.c
+++ b/drivers/pmdomain/ti/omap_prm.c
@@ -44,7 +44,6 @@ struct omap_prm_domain {
u16 pwrstst;
const struct omap_prm_domain_map *cap;
u32 pwrstctrl_saved;
- unsigned int uses_pm_clk:1;
};
struct omap_rst_map {
@@ -630,8 +629,6 @@ static int omap_prm_domain_attach_clock(struct device *dev,
return error;
}
- prmd->uses_pm_clk = 1;
-
return 0;
}
@@ -671,10 +668,8 @@ static void omap_prm_domain_detach_dev(struct generic_pm_domain *domain,
struct device *dev)
{
struct generic_pm_domain_data *genpd_data;
- struct omap_prm_domain *prmd;
- prmd = genpd_to_prm_domain(domain);
- if (prmd->uses_pm_clk)
+ if (!pm_clk_no_clocks(dev))
pm_clk_destroy(dev);
genpd_data = dev_gpd_data(dev);
genpd_data->data = NULL;
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] pmdomain: ti: omap_prm: Remove dummy generic_pm_domain_data handling
2026-11-19 13:22 [PATCH 0/3] pmdomain: ti/core: Miscellaneous cleanups Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 1/3] pmdomain: ti: omap_prm: Use pm_clk_no_clocks() Geert Uytterhoeven
@ 2026-11-19 13:22 ` Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 3/3] pmdomain: core: Remove unused generic_pm_domain_data.data Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:22 UTC (permalink / raw)
To: Nishanth Menon, Santosh Shilimkar, Tero Kristo, Kevin Hilman,
Tony Lindgren, Ulf Hansson, Rafael J . Wysocki
Cc: linux-arm-kernel, linux-pm, linux-kernel, Geert Uytterhoeven
The TI OMAP2+ PRM driver clears generic_pm_domain_data.data in its
generic_pm_domain.attach_dev() and generic_pm_domain.detach() callbacks,
but never sets it to a non-NULL value. Presumably this was part of
unfinished handling copied from the TI SCI Generic Power Domain Driver.
Remove the unused code.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/pmdomain/ti/omap_prm.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/pmdomain/ti/omap_prm.c b/drivers/pmdomain/ti/omap_prm.c
index 9515420da890cb31..eb4ce7cf9c176936 100644
--- a/drivers/pmdomain/ti/omap_prm.c
+++ b/drivers/pmdomain/ti/omap_prm.c
@@ -635,7 +635,6 @@ static int omap_prm_domain_attach_clock(struct device *dev,
static int omap_prm_domain_attach_dev(struct generic_pm_domain *domain,
struct device *dev)
{
- struct generic_pm_domain_data *genpd_data;
struct of_phandle_args pd_args;
struct omap_prm_domain *prmd;
struct device_node *np;
@@ -654,9 +653,6 @@ static int omap_prm_domain_attach_dev(struct generic_pm_domain *domain,
prmd->pd.name, pd_args.args_count);
of_node_put(pd_args.np);
- genpd_data = dev_gpd_data(dev);
- genpd_data->data = NULL;
-
ret = omap_prm_domain_attach_clock(dev, prmd);
if (ret)
return ret;
@@ -667,12 +663,8 @@ static int omap_prm_domain_attach_dev(struct generic_pm_domain *domain,
static void omap_prm_domain_detach_dev(struct generic_pm_domain *domain,
struct device *dev)
{
- struct generic_pm_domain_data *genpd_data;
-
if (!pm_clk_no_clocks(dev))
pm_clk_destroy(dev);
- genpd_data = dev_gpd_data(dev);
- genpd_data->data = NULL;
}
static int omap_prm_domain_init(struct device *dev, struct omap_prm *prm)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] pmdomain: core: Remove unused generic_pm_domain_data.data
2026-11-19 13:22 [PATCH 0/3] pmdomain: ti/core: Miscellaneous cleanups Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 1/3] pmdomain: ti: omap_prm: Use pm_clk_no_clocks() Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 2/3] pmdomain: ti: omap_prm: Remove dummy generic_pm_domain_data handling Geert Uytterhoeven
@ 2026-11-19 13:22 ` Geert Uytterhoeven
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2026-11-19 13:22 UTC (permalink / raw)
To: Nishanth Menon, Santosh Shilimkar, Tero Kristo, Kevin Hilman,
Tony Lindgren, Ulf Hansson, Rafael J . Wysocki
Cc: linux-arm-kernel, linux-pm, linux-kernel, Geert Uytterhoeven
This reverts commit a5ea7a0fcbd7376b2c9fcb15fe59fec298c9ce9f.
The data pointer was added to the generic_pm_domain_data structure
specifically for use by the TI SCI Generic Power Domain Driver, but that
driver stopped using it in commit efa5c01cd7ee2042 ("soc: ti:
ti_sci_pm_domains: switch to use multiple genpds instead of one").
A new dummy user appeared in commit 58cbff023bfaeb9c ("soc: ti:
omap-prm: Add basic power domain support"), probably inspired by the
former, but it was removed, too.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
include/linux/pm_domain.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index d65ee8b3725c1bcb..0f2a9bf48c3e388d 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -304,7 +304,6 @@ struct generic_pm_domain_data {
unsigned int opp_token;
bool hw_mode;
bool rpm_always_on;
- void *data;
};
#ifdef CONFIG_PM_GENERIC_DOMAINS
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-19 13:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 13:22 [PATCH 0/3] pmdomain: ti/core: Miscellaneous cleanups Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 1/3] pmdomain: ti: omap_prm: Use pm_clk_no_clocks() Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 2/3] pmdomain: ti: omap_prm: Remove dummy generic_pm_domain_data handling Geert Uytterhoeven
2026-11-19 13:22 ` [PATCH 3/3] pmdomain: core: Remove unused generic_pm_domain_data.data Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox