pinctrl: single: support gpio request and free
authorHaojian Zhuang <haojian.zhuang@gmail.com>
Thu, 15 Nov 2012 08:36:31 +0000 (16:36 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 21 Nov 2012 07:55:27 +0000 (08:55 +0100)
commit2e8b2eab94c35d83bb7da71c63b4695f32ddca88
tree578f464443efaa00d53f1d698e1dbb82b9f2fe94
parent2ccb0bcfb0dd2001b1a40048c1e407cd9a78bd3d
pinctrl: single: support gpio request and free

Marvell's PXA/MMP silicon also match the behavior of pinctrl-single.
Each pin binds to one register. A lot of pins could be configured
as gpio.

GPIO range is defined as a child node of pinmux in .dtsi file. If those
pins are with the same gpio function configuration in the pinmux
register, they could be defined in the same GPIO range. For this new
child node, two properties are used.

reg = <the start of pinmux register in range, size of range>

pinctrl-single,gpio: <gpio base in range, the gpio function of the range
in the pinmux register>

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c