Commit 21040352 authored by Andrew Lunn's avatar Andrew Lunn Committed by Jason Cooper

ARM: Kirkwood: Convert IB62x0 to use gpio-poweroff.

Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarSimon Baatz <gmbnomis@gmail.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 2c0e7ee6
...@@ -79,4 +79,10 @@ usb-copy { ...@@ -79,4 +79,10 @@ usb-copy {
gpios = <&gpio0 27 0>; gpios = <&gpio0 27 0>;
}; };
}; };
gpio_poweroff {
compatible = "gpio-poweroff";
gpios = <&gpio0 24 0>;
};
}; };
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/ata_platform.h> #include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h> #include <linux/mv643xx_eth.h>
#include <linux/gpio.h>
#include <linux/input.h> #include <linux/input.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -25,8 +24,6 @@ ...@@ -25,8 +24,6 @@
#include "common.h" #include "common.h"
#include "mpp.h" #include "mpp.h"
#define IB62X0_GPIO_POWER_OFF 24
static struct mv643xx_eth_platform_data ib62x0_ge00_data = { static struct mv643xx_eth_platform_data ib62x0_ge00_data = {
.phy_addr = MV643XX_ETH_PHY_ADDR(8), .phy_addr = MV643XX_ETH_PHY_ADDR(8),
}; };
...@@ -49,11 +46,6 @@ static unsigned int ib62x0_mpp_config[] __initdata = { ...@@ -49,11 +46,6 @@ static unsigned int ib62x0_mpp_config[] __initdata = {
0 0
}; };
static void ib62x0_power_off(void)
{
gpio_set_value(IB62X0_GPIO_POWER_OFF, 1);
}
void __init ib62x0_init(void) void __init ib62x0_init(void)
{ {
/* /*
...@@ -62,9 +54,4 @@ void __init ib62x0_init(void) ...@@ -62,9 +54,4 @@ void __init ib62x0_init(void)
kirkwood_mpp_conf(ib62x0_mpp_config); kirkwood_mpp_conf(ib62x0_mpp_config);
kirkwood_ge00_init(&ib62x0_ge00_data); kirkwood_ge00_init(&ib62x0_ge00_data);
if (gpio_request(IB62X0_GPIO_POWER_OFF, "ib62x0:power:off") == 0 &&
gpio_direction_output(IB62X0_GPIO_POWER_OFF, 0) == 0)
pm_power_off = ib62x0_power_off;
else
pr_err("board-ib62x0: failed to configure power-off GPIO\n");
} }
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