aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/generic.c')
-rw-r--r--arch/arm/mach-imx/generic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index a58b678006df..4cfc9d3af28a 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -101,10 +101,11 @@ EXPORT_SYMBOL(imx_gpio_mode);
101 101
102int imx_gpio_request(unsigned gpio, const char *label) 102int imx_gpio_request(unsigned gpio, const char *label)
103{ 103{
104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) 104 if(gpio >= (GPIO_PORT_MAX + 1) * 32) {
105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n", 105 printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO %d for \"%s\"\n",
106 gpio, label ? label : "?"); 106 gpio, label ? label : "?");
107 return -EINVAL; 107 return -EINVAL;
108 }
108 109
109 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) { 110 if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
110 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n", 111 printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for \"%s\" failed\n",
@@ -129,7 +130,7 @@ EXPORT_SYMBOL(imx_gpio_free);
129 130
130int imx_gpio_direction_input(unsigned gpio) 131int imx_gpio_direction_input(unsigned gpio)
131{ 132{
132 imx_gpio_mode(gpio| GPIO_IN); 133 imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR);
133 return 0; 134 return 0;
134} 135}
135 136
@@ -138,7 +139,7 @@ EXPORT_SYMBOL(imx_gpio_direction_input);
138int imx_gpio_direction_output(unsigned gpio, int value) 139int imx_gpio_direction_output(unsigned gpio, int value)
139{ 140{
140 imx_gpio_set_value(gpio, value); 141 imx_gpio_set_value(gpio, value);
141 imx_gpio_mode(gpio| GPIO_OUT); 142 imx_gpio_mode(gpio | GPIO_OUT | GPIO_GIUS | GPIO_DR);
142 return 0; 143 return 0;
143} 144}
144 145