The patch titled gpio: max732x: fix input configuration for open-drain pins has been removed from the -mm tree. Its filename was gpio-max732x-fix-input-configuration-for-open-drain-pins.patch This patch was dropped because an updated version will be merged The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: gpio: max732x: fix input configuration for open-drain pins From: Marc Zyngier <maz@xxxxxxxxxxxxxxx> Fix a bug I noticed while hacking on the max732x driver for interrupt support. According to the datasheets, open-drain pins have to be configured as output-high (which in that case is actually high impedance) to be used as input. Signed-off-by: Marc Zyngier <maz@xxxxxxxxxxxxxxx> Acked-by: Eric Miao <eric.y.miao@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpio/max732x.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff -puN drivers/gpio/max732x.c~gpio-max732x-fix-input-configuration-for-open-drain-pins drivers/gpio/max732x.c --- a/drivers/gpio/max732x.c~gpio-max732x-fix-input-configuration-for-open-drain-pins +++ a/drivers/gpio/max732x.c @@ -223,15 +223,25 @@ static int max732x_gpio_direction_input( { struct max732x_chip *chip; unsigned int mask = 1u << off; + unsigned int is_input; chip = container_of(gc, struct max732x_chip, gpio_chip); - if ((mask & chip->dir_input) == 0) { + is_input = mask & chip->dir_input; + + if (!is_input) { dev_dbg(&chip->client->dev, "%s port %d is output only\n", chip->client->name, 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 ((is_input & chip->dir_output)) + max732x_gpio_set_value(gc, off, 1); + return 0; } _ Patches currently in -mm which might be from maz@xxxxxxxxxxxxxxx are linux-next.patch rtc-ds1302-add-some-abstraction-for-new-platform-support.patch gpio-add-interrupt-handling-capability-to-max732x.patch gpio-max732x-fix-input-configuration-for-open-drain-pins.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html