]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ARM: orion5x: Switch to new sys-off handler API
authorAndrew Davis <afd@ti.com>
Mon, 29 Jul 2024 12:35:34 +0000 (07:35 -0500)
committerGregory CLEMENT <gregory.clement@bootlin.com>
Mon, 2 Sep 2024 12:42:52 +0000 (14:42 +0200)
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: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
arch/arm/mach-orion5x/board-mss2.c
arch/arm/mach-orion5x/dns323-setup.c
arch/arm/mach-orion5x/kurobox_pro-setup.c
arch/arm/mach-orion5x/mv2120-setup.c
arch/arm/mach-orion5x/net2big-setup.c
arch/arm/mach-orion5x/terastation_pro2-setup.c
arch/arm/mach-orion5x/ts209-setup.c
arch/arm/mach-orion5x/ts409-setup.c

index b0f16d223adf58334ace45a59ae128a36ef50e37..9e3d69891d2f6a73edf34974204ad7bbc13491e2 100644 (file)
@@ -82,5 +82,5 @@ static void mss2_power_off(void)
 void __init mss2_init(void)
 {
        /* register mss2 specific power-off method */
-       pm_power_off = mss2_power_off;
+       register_platform_power_off(mss2_power_off);
 }
index 062109efa0ecc680516d1d2d4ad35290fe2d65b1..fcd38ff7ca459c848a01a44a30bfbfa82afe7cbc 100644 (file)
@@ -700,7 +700,7 @@ static void __init dns323_init(void)
                if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
                    gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
                        pr_err("DNS-323: failed to setup power-off GPIO\n");
-               pm_power_off = dns323a_power_off;
+               register_platform_power_off(dns323a_power_off);
                break;
        case DNS323_REV_B1:
                /* 5182 built-in SATA init */
@@ -717,7 +717,7 @@ static void __init dns323_init(void)
                if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
                    gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
                        pr_err("DNS-323: failed to setup power-off GPIO\n");
-               pm_power_off = dns323b_power_off;
+               register_platform_power_off(dns323b_power_off);
                break;
        case DNS323_REV_C1:
                /* 5182 built-in SATA init */
@@ -727,7 +727,7 @@ static void __init dns323_init(void)
                if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 ||
                    gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0)
                        pr_err("DNS-323: failed to setup power-off GPIO\n");
-               pm_power_off = dns323c_power_off;
+               register_platform_power_off(dns323c_power_off);
 
                /* Now, -this- should theoretically be done by the sata_mv driver
                 * once I figure out what's going on there. Maybe the behaviour
index acba0661808010944bd12dbbad3d0dfaa23c21a2..339b10891808fa026a590dfb82dfb74d5dc21e98 100644 (file)
@@ -373,7 +373,7 @@ static void __init kurobox_pro_init(void)
        i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
 
        /* register Kurobox Pro specific power-off method */
-       pm_power_off = kurobox_pro_power_off;
+       register_platform_power_off(kurobox_pro_power_off);
 }
 
 #ifdef CONFIG_MACH_KUROBOX_PRO
index b7327a61283531bef0a53546e623b76fb7968698..5b0249f109cde862daa5f1632e37397ce38ba8d7 100644 (file)
@@ -238,7 +238,7 @@ static void __init mv2120_init(void)
        if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
            gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
                pr_err("mv2120: failed to setup power-off GPIO\n");
-       pm_power_off = mv2120_power_off;
+       register_platform_power_off(mv2120_power_off);
 }
 
 /* Warning: HP uses a wrong mach-type (=526) in their bootloader */
index 6ad9740b426b633dca6adaf07c3760c68bbbdfbd..4afd9b4c71a949df6ffe14c26a5e1f89c722b9b1 100644 (file)
@@ -423,7 +423,7 @@ static void __init net2big_init(void)
 
        if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 &&
            gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0)
-               pm_power_off = net2big_power_off;
+               register_platform_power_off(net2big_power_off);
        else
                pr_err("net2big: failed to configure power-off GPIO\n");
 
index 23a5521c68336830abb0dc81e77f7656759c3d86..a9f01859d1012192c3d02bc0103ee3dfbd4510cb 100644 (file)
@@ -349,7 +349,7 @@ static void __init tsp2_init(void)
        i2c_register_board_info(0, &tsp2_i2c_rtc, 1);
 
        /* register Terastation Pro II specific power-off method */
-       pm_power_off = tsp2_power_off;
+       register_platform_power_off(tsp2_power_off);
 }
 
 MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
index bab8ba0e01ab968f104b713f6c028678a0d681e3..de9092e992c564fe11c73871a9f29d0f01062ece 100644 (file)
@@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void)
        i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
 
        /* register tsx09 specific power-off method */
-       pm_power_off = qnap_tsx09_power_off;
+       register_platform_power_off(qnap_tsx09_power_off);
 }
 
 MACHINE_START(TS209, "QNAP TS-109/TS-209")
index 8131982c10d97e0a477b6266fd0ffdcf10e22139..725688aa5cba7e95ddc80c193b91e5a49e786cb5 100644 (file)
@@ -312,7 +312,7 @@ static void __init qnap_ts409_init(void)
        platform_device_register(&ts409_leds);
 
        /* register tsx09 specific power-off method */
-       pm_power_off = qnap_tsx09_power_off;
+       register_platform_power_off(qnap_tsx09_power_off);
 }
 
 MACHINE_START(TS409, "QNAP TS-409")