2024-06-10 13:01:04

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 1/6] ARM: highbank: Switch to new sys-off handler API

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 <[email protected]>
---
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



2024-06-10 13:06:21

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 4/6] ARM: pxa: Switch to new sys-off handler API

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 <[email protected]>
---
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 3c5f5a3cb480c..e444d7e8aefa0 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -1021,7 +1021,7 @@ static void spitz_restart(enum reboot_mode mode, const char *cmd)
static void __init spitz_init(void)
{
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


2024-06-10 13:06:29

by Andrew Davis

[permalink] [raw]
Subject: [PATCH 5/6] ARM: sa1100: Switch to new sys-off handler API

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 <[email protected]>
---
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


2024-06-10 15:10:43

by Andre Przywara

[permalink] [raw]
Subject: Re: [PATCH 1/6] ARM: highbank: Switch to new sys-off handler API

Hi,

On 10/06/2024 13:59, Andrew Davis 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 <[email protected]>

Reviewed-by: Andre Przywara <[email protected]>

Thanks,
Andre

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