alistair23-linux/include/linux/gpio
Linus Walleij f69e00bd21 gpio: mmio: Support two direction registers
It turns out that one specific hardware has two direction
registers: one to set a GPIO line as input and another one
to set a GPIO line as output. So in theory a line can be
configured as input and output at the same time.

Make the MMIO GPIO helper deal with this: store both
registers in the state container, use both in the generic
code if present. Synchronize the input register to the
output register when we register a GPIO chip, with the
output settings taking precedence.

Keep the helper variable to detect inverted direction
semantics (only direction in register) but augment the
code to be more straight-forward for the generic case
when setting the registers.

Fix some flunky with unreadable direction registers at
the same time as we're touching this code.

Cc: David Woods <dwoods@mellanox.com>
Cc: Shravan Kumar Ramani <sramani@mellanox.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-04-05 00:04:13 +07:00
..
aspeed.h gpio: aspeed: Add interfaces for co-processor to grab GPIOs 2018-07-02 16:10:15 +02:00
consumer.h This is the bulk of GPIO changes for the v4.21 kernel series: 2018-12-28 20:00:21 -08:00
driver.h gpio: mmio: Support two direction registers 2019-04-05 00:04:13 +07:00
gpio-reg.h
machine.h gpio: add core support for pull-up/pull-down configuration 2019-02-13 09:10:14 +01:00