]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: bcm281xx: Centralize register locking
authorMarkus Mayer <markus.mayer@linaro.org>
Wed, 22 Jan 2014 00:10:41 +0000 (16:10 -0800)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Feb 2014 09:33:46 +0000 (10:33 +0100)
commitd88512e4c3d2b456d869ca49f499d25211963e72
treeafb30fdc64176939b4ca6f40da02743146dd4694
parentd158e5920205ed69e0f15e5296d4e26248cee1c7
gpio: bcm281xx: Centralize register locking

Rather than unlock/re-lock for every write access, unlock a GPIO when
it is requested and re-lock it when it is freed. As a result, the GPIO
helper functions no longer have to deal with unlocking and re-locking
the register.

In addition, only unlock a specific GPIO rather than unlocking the
entire GPIO bank as before.

Signed-off-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-bcm-kona.c