]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pass lookup and descriptor flags to request_own
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 26 Apr 2019 12:40:18 +0000 (14:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 7 Jun 2019 21:20:23 +0000 (23:20 +0200)
commit5d91cdf04a19502e4e9f11336a9c1d4183cfdf22
treee037d5e536341d577445356335e62a0c8978528d
parentf1b779ed1bb9d8e59d608b2e388bc9fe5ca1d3a6
gpio: pass lookup and descriptor flags to request_own

When a gpio_chip wants to request a descriptor from itself
using gpiochip_request_own_desc() it needs to be able to specify
fully how to use the descriptor, notably line inversion
semantics. The workaround in the gpiolib.c can be removed
and cases (such as SPI CS) where we need at times to request
a GPIO with line inversion semantics directly on a chip for
workarounds, can be fully supported with this call.

Fix up some users of the API that weren't really using the
last flag to set up the line as input or output properly
but instead just calling direction setting explicitly
after requesting the line.

Cc: Martin Sperl <kernel@martin.sperl.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-omap1/ams-delta-fiq.c
arch/arm/mach-omap1/board-ams-delta.c
drivers/gpio/gpio-mvebu.c
drivers/gpio/gpiolib-acpi.c
drivers/gpio/gpiolib.c
drivers/hid/hid-cp2112.c
drivers/memory/omap-gpmc.c
include/linux/gpio/driver.h