android_kernel_google_msm/drivers/gpio
Thomas Gleixner df9541a60a gpio: pch9: Use proper flow type handlers
Jean-Francois Dagenais reported:

 Configuring a gpio pin with the gpio-pch driver with
 "IRQF_TRIGGER_LOW | IRQF_ONESHOT" generates an interrupt storm for
 threaded ISR until the ISR thread actually gets to physically clear
 the interrupt on the triggering chip!! The immediate observable
 symptom is the high CPU usage for my ISR thread task and the
 interrupt count in /proc/interrupts incrementing radically.

The driver is wrong in several ways:

1) Using handle_simple_irq() does not provide proper flow control
   handling. In the case of oneshot threaded handlers for the
   demultiplexed interrupts this results in an interrupt storm because
   the simple handler does not deal with masking/unmasking.  Even
   without threaded oneshot handlers an interrupt storm for level type
   interrupts can easily be triggered when the interrupt is disabled
   and the interrupt line is activated from the device.

2) Acknowlegding the demultiplexed interrupt before calling the
   handler is wrong for level type interrupts.

3) The set_type function unconditionally enables the interrupt. It's
   supposed to set the type and nothing else. The unmasking is done by
   the core code.

Move the acknowledge code into a separate function and add it to the
demux irqchip callbacks.

Remove the unconditional enabling from the set_type() callback and set
the proper flow handlers depending on the selected type (level/edge).

Reported-and-tested-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-05-11 18:18:50 -06:00
..
devres.c GPIO: add bindings for managed devices 2012-01-04 11:37:42 -07:00
gpio-74x164.c
gpio-ab8500.c
gpio-adp5520.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-adp5588.c gpio: Fix uninitialized variable bit in adp5588_irq_handler 2012-04-10 14:20:55 -06:00
gpio-bt8xx.c
gpio-cs5535.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-da9052.c Changes queued in gpio/next for the start of the 3.3 merge window 2012-01-07 12:15:36 -08:00
gpio-davinci.c gpio/davinci: fix enabling unbanked GPIO IRQs 2012-03-12 11:53:33 -06:00
gpio-ep93xx.c GPIO changes for v3.4 2012-03-28 14:08:46 -07:00
gpio-ge.c powerpc/85xx: Board support for GE IMP3A 2012-03-16 11:15:48 -05:00
gpio-generic.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-it8761e.c
gpio-janz-ttl.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-ks8695.c
gpio-langwell.c
gpio-lpc32xx.c GPIO: LPC32xx: Add output reading to GPO P3 2012-03-12 11:25:30 -06:00
gpio-max730x.c
gpio-max732x.c
gpio-max7300.c
gpio-max7301.c
gpio-mc9s08dz60.c ARM/mx35/3ds: gpio: add mc9s08dz60 gpio function 2012-01-30 07:49:08 -07:00
gpio-mc33880.c
gpio-mcp23s08.c
gpio-ml-ioh.c gpio: Add missing spin_lock_init in gpio-ml-ioh driver 2012-02-01 21:59:37 -07:00
gpio-mpc8xxx.c irq_domain/powerpc: Replace custom xlate functions with library functions 2012-02-16 06:11:24 -07:00
gpio-mpc5200.c
gpio-msm-v1.c
gpio-msm-v2.c
gpio-mxc.c
gpio-mxs.c
gpio-nomadik.c
gpio-omap.c gpio/omap: fix incorrect initialization of omap_gpio_mod_init 2012-05-10 07:16:15 -07:00
gpio-pca953x.c
gpio-pcf857x.c
gpio-pch.c gpio: pch9: Use proper flow type handlers 2012-05-11 18:18:50 -06:00
gpio-pl061.c gpio/gpio-pl061: No need of thaw and poweroff routines for hibernate 2012-02-16 06:37:51 -07:00
gpio-pxa.c ARM: pxa: fix gpio wakeup setting 2012-04-27 10:46:45 +08:00
gpio-rdc321x.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-sa1100.c ARM: 7342/2: sa1100: prepare for sparse irq conversion 2012-03-25 23:57:20 +01:00
gpio-samsung.c gpio/exynos: Fix compiler warning in gpio-samsung.c file 2012-04-10 22:15:39 -06:00
gpio-sch.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-sodaville.c gpio/sodaville: Convert sodaville driver to new irqdomain API 2012-04-10 14:20:55 -06:00
gpio-stmpe.c GPIO changes for v3.4 2012-03-28 14:08:46 -07:00
gpio-sx150x.c
gpio-tc3589x.c
gpio-tegra.c gpio: tegra: Iterate over the correct number of banks 2012-04-04 13:13:18 -06:00
gpio-timberdale.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-tnetv107x.c
gpio-tps65910.c gpio: tps65910: Add sleep control support 2012-02-05 23:08:29 -07:00
gpio-tps65912.c
gpio-twl4030.c gpio/twl: Add DT support to gpio-twl4030 driver 2012-03-22 13:05:55 +01:00
gpio-ucb1400.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-vr41xx.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-vx855.c gpio: Convert GPIO drivers to module_platform_driver 2012-01-02 00:26:06 -07:00
gpio-wm831x.c
gpio-wm8350.c
gpio-wm8994.c gpio: Add decode of WM8994 GPIO configuration 2012-01-02 00:27:01 -07:00
gpio-xilinx.c
gpiolib.c gpiolib: Add comments explaining the _cansleep() WARN_ON()s 2012-03-05 08:05:08 -07:00
Kconfig gpio/sodaville: Convert sodaville driver to new irqdomain API 2012-04-10 14:20:55 -06:00
Makefile GPIO changes for v3.4 2012-03-28 14:08:46 -07:00