]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: add GPIO hogging mechanism
authorBenoit Parrot <bparrot@ti.com>
Mon, 2 Feb 2015 17:44:44 +0000 (11:44 -0600)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 4 Mar 2015 10:09:00 +0000 (11:09 +0100)
commit9e655f8116b40a16995d548982be261ae41b79f7
tree8ca2d7871ec2b0d800ecd9a1e8e582c859deaf31
parent564e4b4dc501392bc5f02278f28fdd51494448d7
gpio: add GPIO hogging mechanism

Based on Boris Brezillion's work this is a reworked patch
of his initial GPIO hogging mechanism.
This patch provides a way to initially configure specific GPIO
when the GPIO controller is probed.

The actual DT scanning to collect the GPIO specific data is performed
as part of gpiochip_add().

The purpose of this is to allow specific GPIOs to be configured
without any driver specific code.
This is particularly useful because board design are getting
increasingly complex and given SoC pins can now have more
than 10 mux values, a lot of connections are now dependent on
external IO muxes to switch various modes.

Specific drivers should not necessarily need to be aware of
what accounts to a specific board implementation. This board level
"description" should be best kept as part of the dts file.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h