Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ebffe39 authored by Andrew Victor's avatar Andrew Victor Committed by Russell King
Browse files

[ARM] 4232/1: AT91: Generic GPIO bug



The new gpio_direction_input() and gpio_direction_output() functions
were both enabling output mode.  When configuring a GPIO for input mode,
you need to program the ODR (Output Disable Register).

Signed-off-by: default avatarAndrew Victor <andrew@sanpeople.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 7f6e2d99
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -210,7 +210,7 @@ int gpio_direction_input(unsigned pin)

	if (!pio || !(__raw_readl(pio + PIO_PSR) & mask))
		return -EINVAL;
	__raw_writel(mask, pio + PIO_OER);
	__raw_writel(mask, pio + PIO_ODR);
	return 0;
}
EXPORT_SYMBOL(gpio_direction_input);