Commit 4bf23b96 authored by Andrew Davis's avatar Andrew Davis Committed by Gregory CLEMENT

ARM: orion5x: 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: default avatarAndrew Davis <afd@ti.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@bootlin.com>
parent 499243b4
...@@ -82,5 +82,5 @@ static void mss2_power_off(void) ...@@ -82,5 +82,5 @@ static void mss2_power_off(void)
void __init mss2_init(void) void __init mss2_init(void)
{ {
/* register mss2 specific power-off method */ /* register mss2 specific power-off method */
pm_power_off = mss2_power_off; register_platform_power_off(mss2_power_off);
} }
...@@ -700,7 +700,7 @@ static void __init dns323_init(void) ...@@ -700,7 +700,7 @@ static void __init dns323_init(void)
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS-323: failed to setup power-off GPIO\n"); 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; break;
case DNS323_REV_B1: case DNS323_REV_B1:
/* 5182 built-in SATA init */ /* 5182 built-in SATA init */
...@@ -717,7 +717,7 @@ static void __init dns323_init(void) ...@@ -717,7 +717,7 @@ static void __init dns323_init(void)
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS-323: failed to setup power-off GPIO\n"); 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; break;
case DNS323_REV_C1: case DNS323_REV_C1:
/* 5182 built-in SATA init */ /* 5182 built-in SATA init */
...@@ -727,7 +727,7 @@ static void __init dns323_init(void) ...@@ -727,7 +727,7 @@ static void __init dns323_init(void)
if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 || if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0) gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS-323: failed to setup power-off GPIO\n"); 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 /* Now, -this- should theoretically be done by the sata_mv driver
* once I figure out what's going on there. Maybe the behaviour * once I figure out what's going on there. Maybe the behaviour
......
...@@ -373,7 +373,7 @@ static void __init kurobox_pro_init(void) ...@@ -373,7 +373,7 @@ static void __init kurobox_pro_init(void)
i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1);
/* register Kurobox Pro specific power-off method */ /* 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 #ifdef CONFIG_MACH_KUROBOX_PRO
......
...@@ -238,7 +238,7 @@ static void __init mv2120_init(void) ...@@ -238,7 +238,7 @@ static void __init mv2120_init(void)
if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 || if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0) gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
pr_err("mv2120: failed to setup power-off GPIO\n"); 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 */ /* Warning: HP uses a wrong mach-type (=526) in their bootloader */
......
...@@ -423,7 +423,7 @@ static void __init net2big_init(void) ...@@ -423,7 +423,7 @@ static void __init net2big_init(void)
if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 && if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 &&
gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0) gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0)
pm_power_off = net2big_power_off; register_platform_power_off(net2big_power_off);
else else
pr_err("net2big: failed to configure power-off GPIO\n"); pr_err("net2big: failed to configure power-off GPIO\n");
......
...@@ -349,7 +349,7 @@ static void __init tsp2_init(void) ...@@ -349,7 +349,7 @@ static void __init tsp2_init(void)
i2c_register_board_info(0, &tsp2_i2c_rtc, 1); i2c_register_board_info(0, &tsp2_i2c_rtc, 1);
/* register Terastation Pro II specific power-off method */ /* 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") MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
......
...@@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void) ...@@ -314,7 +314,7 @@ static void __init qnap_ts209_init(void)
i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1);
/* register tsx09 specific power-off method */ /* 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") MACHINE_START(TS209, "QNAP TS-109/TS-209")
......
...@@ -312,7 +312,7 @@ static void __init qnap_ts409_init(void) ...@@ -312,7 +312,7 @@ static void __init qnap_ts409_init(void)
platform_device_register(&ts409_leds); platform_device_register(&ts409_leds);
/* register tsx09 specific power-off method */ /* 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") MACHINE_START(TS409, "QNAP TS-409")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment