aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/reset.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/reset.c')
-rw-r--r--arch/arm/mach-pxa/reset.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/reset.c b/arch/arm/mach-pxa/reset.c
index 9996c612c3d6..1b2af575c40f 100644
--- a/arch/arm/mach-pxa/reset.c
+++ b/arch/arm/mach-pxa/reset.c
@@ -7,7 +7,7 @@
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/delay.h> 8#include <linux/delay.h>
9#include <linux/gpio.h> 9#include <linux/gpio.h>
10#include <asm/io.h> 10#include <linux/io.h>
11#include <asm/proc-fns.h> 11#include <asm/proc-fns.h>
12 12
13#include <mach/pxa-regs.h> 13#include <mach/pxa-regs.h>
@@ -20,7 +20,7 @@ static void do_hw_reset(void);
20 20
21static int reset_gpio = -1; 21static int reset_gpio = -1;
22 22
23int init_gpio_reset(int gpio) 23int init_gpio_reset(int gpio, int output)
24{ 24{
25 int rc; 25 int rc;
26 26
@@ -30,9 +30,12 @@ int init_gpio_reset(int gpio)
30 goto out; 30 goto out;
31 } 31 }
32 32
33 rc = gpio_direction_input(gpio); 33 if (output)
34 rc = gpio_direction_output(gpio, 0);
35 else
36 rc = gpio_direction_input(gpio);
34 if (rc) { 37 if (rc) {
35 printk(KERN_ERR "Can't configure reset_gpio for input\n"); 38 printk(KERN_ERR "Can't configure reset_gpio\n");
36 gpio_free(gpio); 39 gpio_free(gpio);
37 goto out; 40 goto out;
38 } 41 }