From: Andrew Lunn Date: Fri, 28 Dec 2012 14:14:10 +0000 (+0100) Subject: ARM: Kirkwood: Convert NS2 to gpio-poweroff. X-Git-Tag: next-20130220~18^2~5^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=47580e54affa791d10b6504c7e946e4be4d92b5f;p=karo-tx-linux.git ARM: Kirkwood: Convert NS2 to gpio-poweroff. Remove C code and add a Device Tree node in its place. Signed-off-by: Andrew Lunn Tested-by: Simon Guinot Signed-off-by: Jason Cooper --- diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi index 77d21abfcdf7..e8e7ecef1650 100644 --- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi +++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi @@ -76,4 +76,10 @@ gpios = <&gpio0 12 0>; }; }; + + gpio_poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 31 0>; + }; + }; diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c index f4632a809f68..f2ea3b7ad726 100644 --- a/arch/arm/mach-kirkwood/board-ns2.c +++ b/arch/arm/mach-kirkwood/board-ns2.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include "common.h" @@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; -#define NS2_GPIO_POWER_OFF 31 - -static void ns2_power_off(void) -{ - gpio_set_value(NS2_GPIO_POWER_OFF, 1); -} - void __init ns2_init(void) { /* @@ -39,10 +31,4 @@ void __init ns2_init(void) of_machine_is_compatible("lacie,netspace_mini_v2")) ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); kirkwood_ge00_init(&ns2_ge00_data); - - if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && - gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) - pm_power_off = ns2_power_off; - else - pr_err("ns2: failed to configure power-off GPIO\n"); }