1 From 81cf50fd6cfff13e06cd587094f5094dec32d57d Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Thu, 8 Mar 2012 11:21:33 +0100
4 Subject: [PATCH 29/70] MIPS: lantiq: convert gpio_stp driver to clkdev api
6 Update from old pmu_{dis,en}able() to ckldev api.
8 Signed-off-by: John Crispin <blogic@openwrt.org>
10 arch/mips/lantiq/xway/gpio_stp.c | 12 +++++++++---
11 1 files changed, 9 insertions(+), 3 deletions(-)
13 diff --git a/arch/mips/lantiq/xway/gpio_stp.c b/arch/mips/lantiq/xway/gpio_stp.c
14 index e6b4809..da91c5e 100644
15 --- a/arch/mips/lantiq/xway/gpio_stp.c
16 +++ b/arch/mips/lantiq/xway/gpio_stp.c
18 #include <linux/mutex.h>
20 #include <linux/gpio.h>
21 +#include <linux/clk.h>
22 +#include <linux/err.h>
24 #include <lantiq_soc.h>
26 @@ -78,8 +80,10 @@ static struct gpio_chip ltq_stp_chip = {
30 -static int ltq_stp_hw_init(void)
31 +static int ltq_stp_hw_init(struct device *dev)
36 ltq_stp_w32(0, LTQ_STP_AR);
37 ltq_stp_w32(0, LTQ_STP_CPU0);
38 @@ -105,7 +109,9 @@ static int ltq_stp_hw_init(void)
40 ltq_stp_w32_mask(0, LTQ_STP_ADSL_SRC, LTQ_STP_CON0);
42 - ltq_pmu_enable(PMU_LED);
43 + clk = clk_get(dev, NULL);
44 + WARN_ON(IS_ERR(clk));
49 @@ -138,7 +144,7 @@ static int __devinit ltq_stp_probe(struct platform_device *pdev)
51 ret = gpiochip_add(<q_stp_chip);
53 - ret = ltq_stp_hw_init();
54 + ret = ltq_stp_hw_init(&pdev->dev);