mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Switch more ARM plats to sys-off handler API
@ 2024-12-02 19:41 Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 1/5] ARM: highbank: Switch to new " Andrew Davis
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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().

Thanks,
Andrew

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

-- 
2.39.2


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

* [PATCH v4 1/5] ARM: highbank: Switch to new sys-off handler API
  2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
@ 2024-12-02 19:41 ` Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 2/5] ARM: pxa: " Andrew Davis
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
---
 arch/arm/mach-highbank/highbank.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index 5d4f977ac7d2a..47335c7dadf8d 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -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);
-- 
2.39.2


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

* [PATCH v4 2/5] ARM: pxa: Switch to new sys-off handler API
  2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 1/5] ARM: highbank: Switch to new " Andrew Davis
@ 2024-12-02 19:41 ` Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 3/5] ARM: sa1100: " Andrew Davis
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/mach-pxa/spitz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 33533e35720f8..c0b1f7e6be874 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -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;
 
-- 
2.39.2


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

* [PATCH v4 3/5] ARM: sa1100: Switch to new sys-off handler API
  2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 1/5] ARM: highbank: Switch to new " Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 2/5] ARM: pxa: " Andrew Davis
@ 2024-12-02 19:41 ` Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 4/5] ARM: vt8500: " Andrew Davis
  2024-12-02 19:41 ` [PATCH v4 5/5] arm/xen: " Andrew Davis
  4 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/mach-sa1100/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 0c586047d130f..5383a26f51169 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -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();
 
-- 
2.39.2


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

* [PATCH v4 4/5] ARM: vt8500: Switch to new sys-off handler API
  2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
                   ` (2 preceding siblings ...)
  2024-12-02 19:41 ` [PATCH v4 3/5] ARM: sa1100: " Andrew Davis
@ 2024-12-02 19:41 ` Andrew Davis
  2024-12-04 14:30   ` Alexey Charkov
  2024-12-02 19:41 ` [PATCH v4 5/5] arm/xen: " Andrew Davis
  4 siblings, 1 reply; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/mach-vt8500/vt8500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index 0ab40087ae1cc..1d294255d7083 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -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__);
 }
-- 
2.39.2


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

* [PATCH v4 5/5] arm/xen: Switch to new sys-off handler API
  2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
                   ` (3 preceding siblings ...)
  2024-12-02 19:41 ` [PATCH v4 4/5] ARM: vt8500: " Andrew Davis
@ 2024-12-02 19:41 ` Andrew Davis
  4 siblings, 0 replies; 7+ messages in thread
From: Andrew Davis @ 2024-12-02 19:41 UTC (permalink / raw)
  To: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Alexey Charkov,
	Krzysztof Kozlowski, Stefano Stabellini
  Cc: linux-arm-kernel, linux-kernel, xen-devel, 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.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 arch/arm/xen/enlighten.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index a395b6c0aae2a..8655bc3d36347 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -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;
-- 
2.39.2


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

* Re: [PATCH v4 4/5] ARM: vt8500: Switch to new sys-off handler API
  2024-12-02 19:41 ` [PATCH v4 4/5] ARM: vt8500: " Andrew Davis
@ 2024-12-04 14:30   ` Alexey Charkov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexey Charkov @ 2024-12-04 14:30 UTC (permalink / raw)
  To: Andrew Davis
  Cc: Arnd Bergmann, Andre Przywara, Russell King, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, Krzysztof Kozlowski,
	Stefano Stabellini, linux-arm-kernel, linux-kernel, xen-devel

Hi Andrew,

On Mon, Dec 2, 2024 at 10:41 PM Andrew Davis <afd@ti.com> wrote:
>
> 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.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  arch/arm/mach-vt8500/vt8500.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
> index 0ab40087ae1cc..1d294255d7083 100644
> --- a/arch/arm/mach-vt8500/vt8500.c
> +++ b/arch/arm/mach-vt8500/vt8500.c
> @@ -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);

This really calls for a separate tiny driver under drivers/power to
remove the legacy single-register remapping higher up in this
function... Pending that:

Acked-by: Alexey Charkov <alchark@gmail.com>

Best regards,
Alexey

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

end of thread, other threads:[~2024-12-04 14:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-02 19:41 [PATCH v4 0/5] Switch more ARM plats to sys-off handler API Andrew Davis
2024-12-02 19:41 ` [PATCH v4 1/5] ARM: highbank: Switch to new " Andrew Davis
2024-12-02 19:41 ` [PATCH v4 2/5] ARM: pxa: " Andrew Davis
2024-12-02 19:41 ` [PATCH v4 3/5] ARM: sa1100: " Andrew Davis
2024-12-02 19:41 ` [PATCH v4 4/5] ARM: vt8500: " Andrew Davis
2024-12-04 14:30   ` Alexey Charkov
2024-12-02 19:41 ` [PATCH v4 5/5] arm/xen: " Andrew Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®