Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Andrew Davis <afd@ti.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>

authored by

Andrew Davis and committed by
Gregory CLEMENT
4bf23b96 499243b4

+10 -10
+1 -1
arch/arm/mach-orion5x/board-mss2.c
··· 82 82 void __init mss2_init(void) 83 83 { 84 84 /* register mss2 specific power-off method */ 85 - pm_power_off = mss2_power_off; 85 + register_platform_power_off(mss2_power_off); 86 86 }
+3 -3
arch/arm/mach-orion5x/dns323-setup.c
··· 700 700 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || 701 701 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) 702 702 pr_err("DNS-323: failed to setup power-off GPIO\n"); 703 - pm_power_off = dns323a_power_off; 703 + register_platform_power_off(dns323a_power_off); 704 704 break; 705 705 case DNS323_REV_B1: 706 706 /* 5182 built-in SATA init */ ··· 717 717 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || 718 718 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) 719 719 pr_err("DNS-323: failed to setup power-off GPIO\n"); 720 - pm_power_off = dns323b_power_off; 720 + register_platform_power_off(dns323b_power_off); 721 721 break; 722 722 case DNS323_REV_C1: 723 723 /* 5182 built-in SATA init */ ··· 727 727 if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 || 728 728 gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0) 729 729 pr_err("DNS-323: failed to setup power-off GPIO\n"); 730 - pm_power_off = dns323c_power_off; 730 + register_platform_power_off(dns323c_power_off); 731 731 732 732 /* Now, -this- should theoretically be done by the sata_mv driver 733 733 * once I figure out what's going on there. Maybe the behaviour
+1 -1
arch/arm/mach-orion5x/kurobox_pro-setup.c
··· 373 373 i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); 374 374 375 375 /* register Kurobox Pro specific power-off method */ 376 - pm_power_off = kurobox_pro_power_off; 376 + register_platform_power_off(kurobox_pro_power_off); 377 377 } 378 378 379 379 #ifdef CONFIG_MACH_KUROBOX_PRO
+1 -1
arch/arm/mach-orion5x/mv2120-setup.c
··· 238 238 if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 || 239 239 gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0) 240 240 pr_err("mv2120: failed to setup power-off GPIO\n"); 241 - pm_power_off = mv2120_power_off; 241 + register_platform_power_off(mv2120_power_off); 242 242 } 243 243 244 244 /* Warning: HP uses a wrong mach-type (=526) in their bootloader */
+1 -1
arch/arm/mach-orion5x/net2big-setup.c
··· 423 423 424 424 if (gpio_request(NET2BIG_GPIO_POWER_OFF, "power-off") == 0 && 425 425 gpio_direction_output(NET2BIG_GPIO_POWER_OFF, 0) == 0) 426 - pm_power_off = net2big_power_off; 426 + register_platform_power_off(net2big_power_off); 427 427 else 428 428 pr_err("net2big: failed to configure power-off GPIO\n"); 429 429
+1 -1
arch/arm/mach-orion5x/terastation_pro2-setup.c
··· 349 349 i2c_register_board_info(0, &tsp2_i2c_rtc, 1); 350 350 351 351 /* register Terastation Pro II specific power-off method */ 352 - pm_power_off = tsp2_power_off; 352 + register_platform_power_off(tsp2_power_off); 353 353 } 354 354 355 355 MACHINE_START(TERASTATION_PRO2, "Buffalo Terastation Pro II/Live")
+1 -1
arch/arm/mach-orion5x/ts209-setup.c
··· 314 314 i2c_register_board_info(0, &qnap_ts209_i2c_rtc, 1); 315 315 316 316 /* register tsx09 specific power-off method */ 317 - pm_power_off = qnap_tsx09_power_off; 317 + register_platform_power_off(qnap_tsx09_power_off); 318 318 } 319 319 320 320 MACHINE_START(TS209, "QNAP TS-109/TS-209")
+1 -1
arch/arm/mach-orion5x/ts409-setup.c
··· 312 312 platform_device_register(&ts409_leds); 313 313 314 314 /* register tsx09 specific power-off method */ 315 - pm_power_off = qnap_tsx09_power_off; 315 + register_platform_power_off(qnap_tsx09_power_off); 316 316 } 317 317 318 318 MACHINE_START(TS409, "QNAP TS-409")