kernel-ark/drivers/gpio
Anatolij Gustschin de0ccf7881 gpio: mpc8xxx: don't set IRQ_TYPE_NONE when creating irq mapping
Exporting gpios over sysfs GPIO interface throws genirq
error messages, i.e. on an mpc5121 based board exporting
GPIO 5 triggers it:

    # echo 229 > /sys/class/gpio/export
    genirq: Setting trigger mode 0 for irq 44 failed
    (mpc512x_irq_set_type+0x0/0x18c)

Similar error messages appear in the kernel boot log since the
board specifies GPIOs for matrix keypad and also SD Card write
protect and card detect GPIOs in its device tree. For all these
GPIOs there is an error message in the log.

The issue is triggered by setting the irq type to IRQ_TYPE_NONE
in the driver's irq_domain map function mpc8xxx_gpio_irq_map().

...
  mpc8xxx_gpio_irq_map
    irq_set_irq_type
      __irq_set_trigger

__irq_set_trigger() calls irq_set_type() callback of the mpc8xxx gpio
irq chip with the IRQ_TYPE_NONE in its 'flags' argument. This callback
is either mpc8xxx_irq_set_type() or mpc512x_irq_set_type(). Both these
functions return -EINVAL in the case if IRQ_TYPE_NONE is passed in the
flow_type argument. This return value triggers the observed error
message in __irq_set_trigger(). Modifying these callbacks to not
return an error in IRQ_TYPE_NONE case doesn't make any sense to me.
The line setting IRQ_TYPE_NONE type has been originally added by
commit 345e5c8a "powerpc: Add interrupt support to mpc8xxx_gpio".
At this time set_irq_type() checked its type argument and returned 0
if the type argument didn't specify any meaningful type in its type
sense bits (and thus was equal to IRQ_TYPE_NONE). Effectively this
line was a nop and I wonder what was the point of adding it.

Remove IRQ_TYPE_NONE setting in the irq_domain mapping function.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2013-02-04 21:41:46 +01:00
..
devres.c gpio: export devm_gpio_request_one 2012-07-05 14:49:13 +02:00
gpio-74x164.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-ab8500.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-adnp.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-adp5520.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-adp5588.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-amd8111.c gpio: add a driver for GPIO pins found on AMD-8111 south bridge chips 2012-07-12 13:40:13 +02:00
gpio-arizona.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-bt8xx.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-10-07 17:49:05 +09:00
gpio-clps711x.c GPIO: clps711x: use platform_device_unregister in gpio_clps711x_init() 2012-10-27 18:17:30 +02:00
gpio-cs5535.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-da9052.c This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
gpio-da9055.c DA9055 GPIO driver 2012-10-15 20:50:14 +02:00
gpio-davinci.c gpio: davinci: preparation for switch to common clock framework 2012-09-01 01:12:01 +02:00
gpio-em.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-ep93xx.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-ge.c
gpio-generic.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-ich.c gpio/ich: Add missing spinlock init 2012-12-19 22:13:08 +00:00
gpio-it8761e.c
gpio-janz-ttl.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-ks8695.c
gpio-langwell.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-lpc32xx.c gpio: remove use of __devinitdata 2012-11-28 11:39:59 -08:00
gpio-max730x.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-max732x.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-max7300.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-max7301.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-mc9s08dz60.c gpio: mc9s08dz60: Use devm_kzalloc API 2012-09-01 01:02:27 +02:00
gpio-mc33880.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-mcp23s08.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-ml-ioh.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-mm-lantiq.c
gpio-mpc8xxx.c gpio: mpc8xxx: don't set IRQ_TYPE_NONE when creating irq mapping 2013-02-04 21:41:46 +01:00
gpio-mpc5200.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-msic.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-msm-v1.c
gpio-msm-v2.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-mvebu.c gpio/mvebu-gpio: Make mvebu-gpio depend on OF_CONFIG 2012-12-19 22:15:14 +00:00
gpio-mxc.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-mxs.c gpio: mxs: Add IRQ_TYPE_EDGE_BOTH support 2013-01-29 12:02:05 +01:00
gpio-omap.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-pca953x.c gpio: pca953x: use managed resources 2013-01-28 11:17:04 +01:00
gpio-pcf857x.c gpio: pcf857x: use client->irq for gpio_to_irq() 2012-12-07 09:16:12 +01:00
gpio-pch.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-pl061.c gpio: pl061: set initcall level to module init 2013-01-22 10:43:15 +01:00
gpio-pxa.c gpio: pxa: set initcall level to module init 2013-01-25 10:51:12 +01:00
gpio-rc5t583.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-rdc321x.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-sa1100.c
gpio-samsung.c ARM: arm-soc: driver specific changes 2012-12-13 10:59:11 -08:00
gpio-sch.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-sodaville.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-spear-spics.c gpio: SPEAr: add spi chipselect control driver 2012-11-18 00:01:27 +01:00
gpio-sta2x11.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-stmpe.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-stp-xway.c gpio: remove use of __devinit 2012-11-28 11:39:33 -08:00
gpio-sx150x.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-tc3589x.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-tegra.c Driver core updates for 3.8-rc1 2012-12-11 13:13:55 -08:00
gpio-timberdale.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-tnetv107x.c
gpio-tps6586x.c This is the MFD patch set for the 3.8 merge window. 2012-12-16 18:55:20 -08:00
gpio-tps65910.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-tps65912.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-ts5500.c gpio: add TS-5500 DIO blocks support 2012-12-10 11:23:25 +01:00
gpio-twl4030.c gpio: twl4030: Cache the direction and output states in private data 2013-01-17 11:48:12 +01:00
gpio-twl6040.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-ucb1400.c
gpio-viperboard.c gpio: Add viperboard gpio driver 2012-11-20 12:21:12 +01:00
gpio-vr41xx.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-vt8500.c gpio: vt8500: Export dedicated GPIO before multifunction pins. 2013-01-10 11:45:35 +01:00
gpio-vx855.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-wm831x.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-wm8350.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-wm8994.c gpio: remove use of __devexit 2012-11-28 11:39:59 -08:00
gpio-xilinx.c gpio: remove use of __devinitdata 2012-11-28 11:39:59 -08:00
gpiolib-acpi.c gpiolib-acpi: Add ACPI5 event model support to gpio. 2013-01-29 11:47:06 +01:00
gpiolib-of.c gpiolib: let gpiochip_add_pin_range() specify offset 2012-11-21 08:55:03 +01:00
gpiolib.c gpiolib: remove gpiochip_reserve() 2013-02-04 21:41:46 +01:00
Kconfig gpio: devm_gpio_* support should not depend on GPIOLIB 2013-01-22 10:23:35 +01:00
Makefile gpio: devm_gpio_* support should not depend on GPIOLIB 2013-01-22 10:23:35 +01:00