git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
gpio: max732x: fix input configuration for open-drain pins
[safe/jmp/linux-2.6]
/
drivers
/
gpio
/
max732x.c
diff --git
a/drivers/gpio/max732x.c
b/drivers/gpio/max732x.c
index
26ff401
..
9cad60f
100644
(file)
--- a/
drivers/gpio/max732x.c
+++ b/
drivers/gpio/max732x.c
@@
-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;
}