Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a98b38b83db3d377ede6b72cebe7ed2dc4127766
Commit:     a98b38b83db3d377ede6b72cebe7ed2dc4127766
Parent:     fd51bcc5dc4073b18308f25846aa3b421fa3c42e
Author:     Pavel Pisa <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 29 23:23:38 2007 +0100
Committer:  Russell King <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 10:14:25 2007 +0100

    [ARM] 4561/1: i.MX/MX1 GPIO parenthes omission and input setup fix
    
    During GPIO testing on PiMX1 board there has been revealed
    problem with some pins input functions. The GIUS bit has
    to be set for inputs to work reliably too. It is surprising
    that input worked on some inputs with incorrect setup before.
    DR is not mandatory, but it ensures stable constant level
    on internal traces.
    
    Signed-off-by: Pavel Pisa <[EMAIL PROTECTED]>
    Acked-by: Sascha Hauer <[EMAIL PROTECTED]>
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
---
 arch/arm/mach-imx/generic.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c
index c342595..4cfc9d3 100644
--- a/arch/arm/mach-imx/generic.c
+++ b/arch/arm/mach-imx/generic.c
@@ -101,10 +101,11 @@ EXPORT_SYMBOL(imx_gpio_mode);
 
 int imx_gpio_request(unsigned gpio, const char *label)
 {
-       if(gpio >= (GPIO_PORT_MAX + 1) * 32)
+       if(gpio >= (GPIO_PORT_MAX + 1) * 32) {
                printk(KERN_ERR "imx_gpio: Attempt to request nonexistent GPIO 
%d for \"%s\"\n",
                        gpio, label ? label : "?");
                return -EINVAL;
+       }
 
        if(test_and_set_bit(gpio, imx_gpio_alloc_map)) {
                printk(KERN_ERR "imx_gpio: GPIO %d already used. Allocation for 
\"%s\" failed\n",
@@ -129,7 +130,7 @@ EXPORT_SYMBOL(imx_gpio_free);
 
 int imx_gpio_direction_input(unsigned gpio)
 {
-       imx_gpio_mode(gpio| GPIO_IN);
+       imx_gpio_mode(gpio | GPIO_IN | GPIO_GIUS | GPIO_DR);
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to