]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: support native single-ended hardware drivers
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 22 Mar 2016 09:51:16 +0000 (10:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 5 Apr 2016 14:57:15 +0000 (16:57 +0200)
commitd2e544b3ca85f2ca3da548376a667ed2491d7622
treefbccce2fb9c115fc5f42869cae744dcbc816ea9c
parent135f48d609e043130f5b7989a69efca3cdeea142
gpio: support native single-ended hardware drivers

Some GPIO controllers has a special hardware bit we can flip
to support open drain / source. This means that on these hardwares
we do not need to emulate OD/OS by setting the line to input
instead of actively driving it high/low. Add an optional vtable
callback to the driver set_single_ended() so that driver can
implement this in hardware if they have it.

We may need a pinctrl_gpio_set_config() call at some point to
propagate this down to a backing pin control device on systems
with split GPIO/pin control.

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c
include/linux/gpio/driver.h