Skip to contentSkip to conversation

Switch more ARM plats to sys-off handler API

PATCH Superseded Andrew Davis 3 participants 8 messages Apr 7, 2025 – Apr 8, 2025

Subsystems (6)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#5 lore raw

PATCH v5 5/5 arm/xen: Switch to new sys-off handler API

In reply to Andrew Davis

Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API.

---
 arch/arm/xen/enlighten.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/xen/enlighten.c +1 -1
index a395b6c0aae2a..8655bc3d36347 100644
@@ -541,7 +541,7 @@ static int __init xen_late_init(void)
 	if (!xen_domain())
 		return -ENODEV;
 
-	pm_power_off = xen_power_off;
+	register_platform_power_off(xen_power_off);
 	register_restart_handler(&xen_restart_nb);
 	if (!xen_initial_domain()) {
 		struct timespec64 ts;
Signature · 1 line
2.39.2
#2 lore raw

PATCH v5 2/5 ARM: pxa: Switch to new sys-off handler API

In reply to Andrew Davis

Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API.

---
 arch/arm/mach-pxa/spitz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-pxa/spitz.c +1 -1
index 33533e35720f8..c0b1f7e6be874 100644
@@ -1096,7 +1096,7 @@ static void __init spitz_init(void)
 		software_node_register(&spitz_scoop_2_gpiochip_node);
 
 	init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
-	pm_power_off = spitz_poweroff;
+	register_platform_power_off(spitz_poweroff);
 
 	PMCR = 0x00;
 
Signature · 1 line
2.39.2
#4 lore raw

PATCH v5 4/5 ARM: vt8500: Switch to new sys-off handler API

In reply to Andrew Davis

Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API.

---
 arch/arm/mach-vt8500/vt8500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-vt8500/vt8500.c +1 -1
index 0ab40087ae1cc..1d294255d7083 100644
@@ -141,7 +141,7 @@ static void __init vt8500_init(void)
 			pr_err("%s:ioremap(power_off) failed\n", __func__);
 	}
 	if (pmc_base)
-		pm_power_off = &vt8500_power_off;
+		register_platform_power_off(vt8500_power_off);
 	else
 		pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
 }
Signature · 1 line
2.39.2
#3 lore raw

PATCH v5 3/5 ARM: sa1100: Switch to new sys-off handler API

In reply to Andrew Davis

Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API.

---
 arch/arm/mach-sa1100/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-sa1100/generic.c +1 -1
index 0c586047d130f..5383a26f51169 100644
@@ -298,7 +298,7 @@ static struct platform_device *sa11x0_devices[] __initdata = {
 static int __init sa1100_init(void)
 {
 	struct resource wdt_res = DEFINE_RES_MEM(0x90000000, 0x20);
-	pm_power_off = sa1100_power_off;
+	register_platform_power_off(sa1100_power_off);
 
 	regulator_has_full_constraints();
 
Signature · 1 line
2.39.2
#1 lore raw

PATCH v5 1/5 ARM: highbank: Switch to new sys-off handler API

In reply to Andrew Davis

Kernel now supports chained power-off handlers. Use register_platform_power_off() that registers a platform level power-off handler. Legacy pm_power_off() will be removed once all drivers and archs are converted to the new sys-off API.

---
 arch/arm/mach-highbank/highbank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-highbank/highbank.c +1 -1
index 5d4f977ac7d2a..47335c7dadf8d 100644
@@ -143,7 +143,7 @@ static void __init highbank_init(void)
 	sregs_base = of_iomap(np, 0);
 	WARN_ON(!sregs_base);
 
-	pm_power_off = highbank_power_off;
+	register_platform_power_off(highbank_power_off);
 	highbank_pm_init();
 
 	bus_register_notifier(&platform_bus_type, &highbank_platform_nb);
Signature · 1 line
2.39.2
#0 lore raw

v5 cover Switch more ARM plats to sys-off handler API

Hello all,

Continuing the quest to remove the legacy pm_power_off() global function handler. Remove uses from arch/arm/ using the helper register_platform_power_off().

These have been sent for several cycles without feedback, not sure if there are anymore active platform maintainers who can take these individually, maybe these remaining could go in directly though the arm-soc tree?

Thanks,
Andrew

Changes for v5:
- Rebase on v6.15-rc1

Changes for v4:
- Drop already taken patches
- Rebase on latest master

Changes for v3:
- Rebase on v6.12-rc1

Changes for v2:
- Collect Reviewed/Acked-bys
- Rebase on v6.11-rc1

Andrew Davis (5):
ARM: highbank: Switch to new sys-off handler API
ARM: pxa: Switch to new sys-off handler API
ARM: sa1100: Switch to new sys-off handler API
ARM: vt8500: Switch to new sys-off handler API arm/xen: Switch to new sys-off handler API

 arch/arm/mach-highbank/highbank.c | 2 +-
 arch/arm/mach-pxa/spitz.c         | 2 +-
 arch/arm/mach-sa1100/generic.c    | 2 +-
 arch/arm/mach-vt8500/vt8500.c     | 2 +-
 arch/arm/xen/enlighten.c          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.39.2
#6 lore raw
Quoted 10 lines · Andrew Davis

Hello all,

Continuing the quest to remove the legacy pm_power_off() global function handler. Remove uses from arch/arm/ using the helper register_platform_power_off().

These have been sent for several cycles without feedback, not sure if there are anymore active platform maintainers who can take these individually, maybe these remaining could go in directly though the arm-soc tree?

Sure, can you send them to [email protected] in a few days, with any final Acks you may get? That way it ends up in patchwork and I can trivially pick them up.

Since it's only a few one-line changes that all do the same thing, you can also combine them into a single patch.

Arnd

#7 lore raw
In reply to Andrew Davis
Quoted 10 lines · Andrew Davis

Hello all,

Continuing the quest to remove the legacy pm_power_off() global function handler. Remove uses from arch/arm/ using the helper register_platform_power_off().

These have been sent for several cycles without feedback, not sure if there are anymore active platform maintainers who can take these individually, maybe these remaining could go in directly though the arm-soc tree?

I was waiting for explaining the dependencies, to know if I can or cannot pick up. I don't see much changed here.

Best regards,
Krzysztof