]> Pileus Git - ~andy/linux/blobdiff - drivers/gpio/max732x.c
Merge branch 'x86-mrst-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[~andy/linux] / drivers / gpio / max732x.c
index 26ff40110d9f4a672d7aafa24279ddd0ccfd2963..9cad60f9e9620f249bf1c01f38346455476405bb 100644 (file)
@@ -232,6 +232,13 @@ static int max732x_gpio_direction_input(struct gpio_chip *gc, unsigned off)
                return -EACCES;
        }
 
+       /*
+        * Open-drain pins must be set to high impedance (which is
+        * equivalent to output-high) to be turned into an input.
+        */
+       if ((mask & chip->dir_output))
+               max732x_gpio_set_value(gc, off, 1);
+
        return 0;
 }