]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit - drivers/gpio/mxc_gpio.c
mxc: Make gpio_get_value() use PSR
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Mon, 20 Aug 2012 10:55:41 +0000 (10:55 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 1 Sep 2012 12:58:28 +0000 (14:58 +0200)
commit5dafa4543c399d329c7b01df1afa98437861cac0
tree2c33860a28c4d7c492e1f15e0aa8dd9a13d3e482
parent5c8d14dfd978eb787307298110a32329e989e6ab
mxc: Make gpio_get_value() use PSR

gpio_get_value() should use PSR like Linux, not DR, because DR does not always
reflect the pin state, while PSR does. This is especially useful to detect a
short circuit on a GPIO pin configured as output, or to read the level of a pin
controlled by a non-GPIO IOMUX function.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
drivers/gpio/mxc_gpio.c