aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-02-22 11:14:44 +0100
committerLinus Walleij <linus.walleij@linaro.org>2019-04-05 00:04:13 +0700
commitf69e00bd21aa6a1961c521b6eb199137fcb8a76a (patch)
tree0875c21d01d88d2ab5224de0548246f25dcb2d15 /mm
parent9e98c678c2d6ae3a17cb2de55d17f69dddaa231b (diff)
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>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions