gpio: mxc: add generic gpio request/free callbacks to pinctrl
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Thu, 8 Sep 2016 01:48:16 +0000 (04:48 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 12 Sep 2016 12:28:59 +0000 (14:28 +0200)
commit4c806c9891100e80cbd6be654de7c8ca6f6be3ef
tree1d3382c859b48963d136519b00cbed5b86d0f1b4
parente188cbf7564fba80e8339b9406e8740f3e495c63
gpio: mxc: add generic gpio request/free callbacks to pinctrl

If a GPIO controller description in board DTB contains information
about mappings between GPIOs and pads under IOMUX control use it to
request and free GPIOs with respect to pinctrl/pinmux subsystems.

One of immediate positive functional changes is inability to
request non-existing GPIOs, i.e. if there is no pad such. Also
pinctrl/pinmux may now properly account pads occupied by requested
GPIOs.

The change has no effect, if "gpio-ranges" property is not found
including the case if a board has no DTB firmware.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mxc.c