|
@@ -20,7 +20,7 @@ static void do_hw_reset(void);
|
|
|
|
|
|
static int reset_gpio = -1;
|
|
static int reset_gpio = -1;
|
|
|
|
|
|
-int init_gpio_reset(int gpio)
|
|
|
|
|
|
+int init_gpio_reset(int gpio, int output)
|
|
{
|
|
{
|
|
int rc;
|
|
int rc;
|
|
|
|
|
|
@@ -30,9 +30,12 @@ int init_gpio_reset(int gpio)
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
- rc = gpio_direction_input(gpio);
|
|
|
|
|
|
+ if (output)
|
|
|
|
+ rc = gpio_direction_output(gpio, 0);
|
|
|
|
+ else
|
|
|
|
+ rc = gpio_direction_input(gpio);
|
|
if (rc) {
|
|
if (rc) {
|
|
- printk(KERN_ERR "Can't configure reset_gpio for input\n");
|
|
|
|
|
|
+ printk(KERN_ERR "Can't configure reset_gpio\n");
|
|
gpio_free(gpio);
|
|
gpio_free(gpio);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|