提交 102c9543 编写于 作者: A Andrew Lunn 提交者: Arnd Bergmann

ARM: Kirkwood: Convert NS2 to gpio-poweroff.

Remove C code and add a Device Tree node in its place.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Tested-by: NSimon Guinot <simon.guinot@sequanux.org>
Signed-off-by: NJason Cooper <jason@lakedaemon.net>
上级 b4d2a24f
...@@ -76,4 +76,10 @@ ...@@ -76,4 +76,10 @@
gpios = <&gpio0 12 0>; gpios = <&gpio0 12 0>;
}; };
}; };
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio0 31 0>;
};
}; };
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/of.h> #include <linux/of.h>
#include "common.h" #include "common.h"
...@@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = { ...@@ -23,13 +22,6 @@ static struct mv643xx_eth_platform_data ns2_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8), .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) void __init ns2_init(void)
{ {
/* /*
...@@ -39,10 +31,4 @@ void __init ns2_init(void) ...@@ -39,10 +31,4 @@ void __init ns2_init(void)
of_machine_is_compatible("lacie,netspace_mini_v2")) of_machine_is_compatible("lacie,netspace_mini_v2"))
ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
kirkwood_ge00_init(&ns2_ge00_data); 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");
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册