linux/drivers/gpio
Linus Walleij d468bf9eca gpio: add API to be strict about GPIO IRQ usage
It is currently often possible in many GPIO drivers to request
a GPIO line to be used as IRQ after calling gpio_to_irq() and,
as the gpiolib is not aware of this, set the same line to
output and start driving it, with undesired side effects.

As it is a bogus usage scenario to request a line flagged as
output to used as IRQ, we introduce APIs to let gpiolib track
the use of a line as IRQ, and also set this flag from the
userspace ABI.

The API is symmetric so that lines can also be flagged from
.irq_enable() and unflagged from IRQ by .irq_disable().
The debugfs file is altered so that we see if a line is
reserved for IRQ.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-10-16 09:59:54 +02:00
..
devres.c
gpio-74x164.c gpio: gpio-74x164: Remove redundant of_match_ptr 2013-09-23 12:52:21 +02:00
gpio-adnp.c gpio: adnp: rename "virq" to "child_irq" 2013-10-16 09:59:10 +02:00
gpio-adp5520.c
gpio-adp5588.c
gpio-amd8111.c
gpio-arizona.c gpio: arizona: Use the of_node from the Arizona device 2013-10-02 12:50:35 +02:00
gpio-bcm-kona.c gpio: bcm_kona: rename confusing variables 2013-10-16 09:59:17 +02:00
gpio-bt8xx.c gpio: bt8xx: remove unnecessary pci_set_drvdata() 2013-09-20 20:43:09 +02:00
gpio-clps711x.c gpio: clps711x: Remove redundant of_match_ptr 2013-10-02 12:43:25 +02:00
gpio-cs5535.c
gpio-da9052.c
gpio-da9055.c
gpio-davinci.c
gpio-em.c gpio: em: drop references to "virtual" IRQ 2013-10-16 09:59:41 +02:00
gpio-ep93xx.c gpio: ep93xx: get rid of bogus __raw* accessors 2013-10-16 09:59:54 +02:00
gpio-f7188x.c
gpio-ge.c
gpio-generic.c
gpio-grgpio.c
gpio-ich.c
gpio-intel-mid.c gpio: intel-mid: drop references to "virtual" IRQ 2013-10-16 09:59:51 +02:00
gpio-iop.c ARM: plat-iop: pass physical base for GPIO 2013-09-20 23:05:19 +02:00
gpio-it8761e.c
gpio-janz-ttl.c
gpio-kempld.c
gpio-ks8695.c
gpio-lpc32xx.c
gpio-lynxpoint.c gpio: lynxpoint: drop references to "virtual" IRQ 2013-10-16 09:59:52 +02:00
gpio-max730x.c
gpio-max732x.c
gpio-max7300.c
gpio-max7301.c
gpio-mc9s08dz60.c
gpio-mc33880.c gpio: gpio-mc33880: Remove redundant spi_set_drvdata 2013-09-23 12:53:13 +02:00
gpio-mcp23s08.c
gpio-ml-ioh.c
gpio-mm-lantiq.c
gpio-mpc8xxx.c gpio: mpc8xxx: drop references to "virtual" IRQ 2013-10-16 09:59:52 +02:00
gpio-mpc5200.c
gpio-msic.c
gpio-msm-v1.c
gpio-msm-v2.c
gpio-mvebu.c
gpio-mxc.c
gpio-mxs.c
gpio-octeon.c
gpio-omap.c
gpio-palmas.c gpio: palmas: add support for TPS80036 2013-09-19 15:31:48 +02:00
gpio-pca953x.c gpio: pca953x: Don't flip bits on PCA957x GPIO expanders when probing them. 2013-09-23 12:57:11 +02:00
gpio-pcf857x.c gpio: pcf857x: Add OF support 2013-09-23 20:00:01 +02:00
gpio-pch.c
gpio-pl061.c gpio: pl061: drop references to "virtual" IRQ 2013-10-16 09:59:52 +02:00
gpio-pxa.c
gpio-rc5t583.c
gpio-rcar.c gpio: rcar: drop references to "virtual" IRQ 2013-10-16 09:59:53 +02:00
gpio-rdc321x.c
gpio-sa1100.c
gpio-samsung.c
gpio-sch.c
gpio-sodaville.c
gpio-spear-spics.c
gpio-sta2x11.c
gpio-stmpe.c gpio: stmpe: drop references to "virtual" IRQ, fix bug 2013-10-16 09:59:53 +02:00
gpio-stp-xway.c
gpio-sx150x.c
gpio-tc3589x.c gpio: tc3589x: drop references to "virtual" IRQ 2013-10-11 19:06:12 +02:00
gpio-tegra.c
gpio-timberdale.c
gpio-tnetv107x.c
gpio-tps6586x.c
gpio-tps65910.c
gpio-tps65912.c
gpio-ts5500.c
gpio-twl4030.c gpio: twl4030: Remove redundant of_match_ptr 2013-10-02 12:44:34 +02:00
gpio-twl6040.c
gpio-tz1090-pdc.c
gpio-tz1090.c
gpio-ucb1400.c
gpio-viperboard.c
gpio-vr41xx.c
gpio-vx855.c
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c
gpio-xilinx.c
gpiolib-acpi.c gpiolib / ACPI: move acpi_gpiochip_free_interrupts next to the request function 2013-10-11 12:54:23 +02:00
gpiolib-of.c
gpiolib.c gpio: add API to be strict about GPIO IRQ usage 2013-10-16 09:59:54 +02:00
Kconfig gpio: rename gpio-langwell to gpio-intel-mid 2013-10-11 16:30:47 +02:00
Makefile gpio: rename gpio-langwell to gpio-intel-mid 2013-10-11 16:30:47 +02:00