From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: [PATCH 3/3] ARM: Kirkwood: Convert IB62x0 to use gpio-poweroff. Date: Sun, 11 Nov 2012 17:21:31 +0100 Message-ID: <1352650891-18356-4-git-send-email-andrew@lunn.ch> References: <1352650891-18356-1-git-send-email-andrew@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1352650891-18356-1-git-send-email-andrew@lunn.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: linus.walleij@linaro.org Cc: Andrew Lunn , Jason Cooper , devicetree-discuss@lists.ozlabs.org, jm@lentin.co.uk, linux-arm-kernel@lists.infradead.org, gmbnomis@gmail.com List-Id: devicetree@vger.kernel.org Signed-off-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood-ib62x0.dts | 6 ++++++ arch/arm/mach-kirkwood/board-ib62x0.c | 13 ------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 66794ed..9b0e2e3 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts @@ -79,4 +79,10 @@ gpios = <&gpio0 27 0>; }; }; + gpio_poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 24 1>; + }; + + }; diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index cfc47f8..7b8adf5 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include "common.h" #include "mpp.h" -#define IB62X0_GPIO_POWER_OFF 24 - static struct mv643xx_eth_platform_data ib62x0_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; @@ -49,11 +46,6 @@ static unsigned int ib62x0_mpp_config[] __initdata = { 0 }; -static void ib62x0_power_off(void) -{ - gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); -} - void __init ib62x0_init(void) { /* @@ -63,9 +55,4 @@ void __init ib62x0_init(void) kirkwood_ehci_init(); 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"); } -- 1.7.10.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrew@lunn.ch (Andrew Lunn) Date: Sun, 11 Nov 2012 17:21:31 +0100 Subject: [PATCH 3/3] ARM: Kirkwood: Convert IB62x0 to use gpio-poweroff. In-Reply-To: <1352650891-18356-1-git-send-email-andrew@lunn.ch> References: <1352650891-18356-1-git-send-email-andrew@lunn.ch> Message-ID: <1352650891-18356-4-git-send-email-andrew@lunn.ch> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Signed-off-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood-ib62x0.dts | 6 ++++++ arch/arm/mach-kirkwood/board-ib62x0.c | 13 ------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts index 66794ed..9b0e2e3 100644 --- a/arch/arm/boot/dts/kirkwood-ib62x0.dts +++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts @@ -79,4 +79,10 @@ gpios = <&gpio0 27 0>; }; }; + gpio_poweroff { + compatible = "gpio-poweroff"; + gpios = <&gpio0 24 1>; + }; + + }; diff --git a/arch/arm/mach-kirkwood/board-ib62x0.c b/arch/arm/mach-kirkwood/board-ib62x0.c index cfc47f8..7b8adf5 100644 --- a/arch/arm/mach-kirkwood/board-ib62x0.c +++ b/arch/arm/mach-kirkwood/board-ib62x0.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -25,8 +24,6 @@ #include "common.h" #include "mpp.h" -#define IB62X0_GPIO_POWER_OFF 24 - static struct mv643xx_eth_platform_data ib62x0_ge00_data = { .phy_addr = MV643XX_ETH_PHY_ADDR(8), }; @@ -49,11 +46,6 @@ static unsigned int ib62x0_mpp_config[] __initdata = { 0 }; -static void ib62x0_power_off(void) -{ - gpio_set_value(IB62X0_GPIO_POWER_OFF, 1); -} - void __init ib62x0_init(void) { /* @@ -63,9 +55,4 @@ void __init ib62x0_init(void) kirkwood_ehci_init(); 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"); } -- 1.7.10.4