• Linus Walleij's avatar
    ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs · 88277ac7
    Linus Walleij authored
    commit dcf5907e0e09a160a57160729f920add5df8e358 upstream.
    
    The Qualcomm SPMI GPIO and MPP lines are problematic: the
    are fetched from the main MFD driver with platform_get_irq()
    which means that at this point they will all be assigned the
    flags set up for the interrupts in the device tree.
    
    That is problematic since these are flagged as rising edge
    and an this point the interrupt descriptor is assigned a
    rising edge, while the only thing the GPIO/MPP drivers really
    do is issue irq_get_irqchip_state() on the line to read it
    out and to provide a .to_irq() helper for *other* IRQ
    consumers.
    
    If another device tree node tries to flag the same IRQ
    for use as something else than rising edge, the kernel
    irqdomain core will protest like this:
    
      type mismatch, failed to map hwirq-NN for <FOO>!
    
    Which is what happens when the device tree defines two
    contradictory flags for the same interrupt line.
    
    To work around this and alleviate the problem, assign 0
    as flag for the interrupts taken by the PM GPIO and MPP
    drivers. This will lead to the flag being unset, and a
    second consumer requesting rising, falling, both or level
    interrupts will be respected. This is what the qcom-pm*.dtsi
    files already do.
    
    Switched to using the symbolic name IRQ_TYPE_NONE so that
    we get this more readable.
    
    This misconfiguration was caused by a copy/pasting the
    APQ8064 set-up, the latter has been fixed in a separate
    patch.
    
    Tested with one of the SPMI GPIOs: after this I can
    successfully request one of these GPIOs as falling edge
    from the device tree.
    
    Fixes: 0840ea9e ("ARM: dts: add GPIO and MPP to MSM8660 PMIC")
    Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Cc: Stephen Boyd <sboyd@codeaurora.org>
    Cc: Björn Andersson <bjorn.andersson@linaro.org>
    Cc: Ivan T. Ivanov <ivan.ivanov@linaro.org>
    Cc: John Stultz <john.stultz@linaro.org>
    Cc: Andy Gross <andy.gross@linaro.org>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarAndy Gross <andy.gross@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    88277ac7
Name
Last commit
Last update
..
boot Loading commit data...
common Loading commit data...
configs Loading commit data...
crypto Loading commit data...
firmware Loading commit data...
include Loading commit data...
kernel Loading commit data...
kvm Loading commit data...
lib Loading commit data...
mach-alpine Loading commit data...
mach-artpec Loading commit data...
mach-asm9260 Loading commit data...
mach-aspeed Loading commit data...
mach-at91 Loading commit data...
mach-axxia Loading commit data...
mach-bcm Loading commit data...
mach-berlin Loading commit data...
mach-clps711x Loading commit data...
mach-cns3xxx Loading commit data...
mach-davinci Loading commit data...
mach-digicolor Loading commit data...
mach-dove Loading commit data...
mach-ebsa110 Loading commit data...
mach-efm32 Loading commit data...
mach-ep93xx Loading commit data...
mach-exynos Loading commit data...
mach-footbridge Loading commit data...
mach-gemini Loading commit data...
mach-highbank Loading commit data...
mach-hisi Loading commit data...
mach-imx Loading commit data...
mach-integrator Loading commit data...
mach-iop13xx Loading commit data...
mach-iop32x Loading commit data...
mach-iop33x Loading commit data...
mach-ixp4xx Loading commit data...
mach-keystone Loading commit data...
mach-ks8695 Loading commit data...
mach-lpc18xx Loading commit data...
mach-lpc32xx Loading commit data...
mach-mediatek Loading commit data...
mach-meson Loading commit data...
mach-mmp Loading commit data...
mach-moxart Loading commit data...
mach-mv78xx0 Loading commit data...
mach-mvebu Loading commit data...
mach-mxs Loading commit data...
mach-netx Loading commit data...
mach-nomadik Loading commit data...
mach-nspire Loading commit data...
mach-omap1 Loading commit data...
mach-omap2 Loading commit data...
mach-orion5x Loading commit data...
mach-oxnas Loading commit data...
mach-picoxcell Loading commit data...
mach-prima2 Loading commit data...
mach-pxa Loading commit data...
mach-qcom Loading commit data...
mach-realview Loading commit data...
mach-rockchip Loading commit data...
mach-rpc Loading commit data...
mach-s3c24xx Loading commit data...
mach-s3c64xx Loading commit data...
mach-s5pv210 Loading commit data...
mach-sa1100 Loading commit data...
mach-shmobile Loading commit data...
mach-socfpga Loading commit data...
mach-spear Loading commit data...
mach-sti Loading commit data...
mach-stm32 Loading commit data...
mach-sunxi Loading commit data...
mach-tango Loading commit data...
mach-tegra Loading commit data...
mach-u300 Loading commit data...
mach-uniphier Loading commit data...
mach-ux500 Loading commit data...
mach-versatile Loading commit data...
mach-vexpress Loading commit data...
mach-vt8500 Loading commit data...
mach-w90x900 Loading commit data...
mach-zx Loading commit data...
mach-zynq Loading commit data...
mm Loading commit data...
net Loading commit data...
nwfpe Loading commit data...
oprofile Loading commit data...
plat-iop Loading commit data...
plat-omap Loading commit data...
plat-orion Loading commit data...
plat-pxa Loading commit data...
plat-samsung Loading commit data...
plat-versatile Loading commit data...
probes Loading commit data...
tools Loading commit data...
vdso Loading commit data...
vfp Loading commit data...
xen Loading commit data...
Kconfig Loading commit data...
Kconfig-nommu Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...