]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: twl4030: Cache the direction and output states in private data
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 20 Dec 2012 09:44:11 +0000 (10:44 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 17 Jan 2013 10:48:12 +0000 (11:48 +0100)
commitdd1ee9a5fd4afcc9c50ec1c7d133c0520407c8bf
tree8776ec8a8887ae144f07de5b94fd7afa113c84bd
parent09ae27e3b4f67dcabdf082ef2ba17ec7d308dd29
gpio: twl4030: Cache the direction and output states in private data

Use more coherent locking in the driver. Use bitfield to store the GPIO
direction and if the pin is configured as output store the status also in a
bitfiled.
In this way we can just look at these bitfields when we need information
about the pin status and only reach out to the chip when it is needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-twl4030.c