]> git.baikalelectronics.ru Git - kernel.git/commit
plat-nomadik: implement safe switch sequence for Alt-C
authorRabin Vincent <rabin.vincent@stericsson.com>
Mon, 13 Dec 2010 06:32:40 +0000 (12:02 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 14 Mar 2011 13:05:15 +0000 (14:05 +0100)
commitbf0f7eb4b61a9faff21e7c7c7d681ff536202a6c
tree710acb7f8eacaa4d11dfbc8bf584226680ce6513
parent6495796745145d9b22cfd8cd05123e96a2fb0fb1
plat-nomadik: implement safe switch sequence for Alt-C

Setting pinmux alternative C for a GPIO pin is actually not
so easy since it ivolves setting value "1" in two registers,
and since the combined result will take effect for intermediate
values (01 or 10) this will cause glitches while you wrote one
register but have not yet written the other.

This patch implements a series of kludges including an optional
machine-specific callback to avoid glitches when changing pin
mux mode to alternative C.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/plat-nomadik/gpio.c
arch/arm/plat-nomadik/include/plat/gpio.h