summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-xilinx.c
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2016-05-13 23:07:11 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-06-08 11:15:11 +0200
commite698613ada5896a42d2f352296fd999d7dcaf4f3 (patch)
tree07b49d3a265a27b963ec00addde2386e1d818a54 /drivers/gpio/gpio-xilinx.c
parent54b729987bfcb2c89ff1df878e1010a8121bf53e (diff)
downloadlinux-e698613ada5896a42d2f352296fd999d7dcaf4f3.tar.gz
linux-e698613ada5896a42d2f352296fd999d7dcaf4f3.tar.bz2
linux-e698613ada5896a42d2f352296fd999d7dcaf4f3.zip
gpio: mmio: add DT support for memory-mapped GPIOs
This patch adds support for defining memory-mapped GPIOs which are compatible with the existing gpio-mmio interface. The generic library provides support for many memory-mapped GPIO controllers that are found in various on-board FPGA and ASIC solutions that are used to control board's switches, LEDs, chip-selects, Ethernet/USB PHY power, etc. For setting GPIOs there are three configurations: 1. single input/output register resource (named "dat"), 2. set/clear pair (named "set" and "clr"), 3. single output register resource and single input resource ("set" and dat"). The configuration is detected by which resources are present. For the single output register, this drives a 1 by setting a bit and a zero by clearing a bit. For the set clr pair, this drives a 1 by setting a bit in the set register and clears it by setting a bit in the clear register. For setting the GPIO direction, there are three configurations: a. simple bidirectional GPIOs that requires no configuration. b. an output direction register (named "dirout") where a 1 bit indicates the GPIO is an output. c. an input direction register (named "dirin") where a 1 bit indicates the GPIO is an input. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-xilinx.c')
0 files changed, 0 insertions, 0 deletions