All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-05  8:38 ` Linus Walleij
  0 siblings, 0 replies; 18+ messages in thread
From: Linus Walleij @ 2016-08-05  8:38 UTC (permalink / raw)
  To: linux-arm-kernel, linux-arm-msm, linux-soc, Andy Gross,
	John Stultz, Srinivas Kandagatla
  Cc: Stephen Boyd, Bjorn Andersson, David Brown, Linus Walleij

This came out after some frustration with trying to flag a PM8058
interrupt line on the APQ8060 (MSM8660) to trigger on falling
edges. It was conflicting badly with predefined contradictory
flags in the device tree for the entire GPIO block. The same
seems to hold for the MPP GPIO IRQs.

This was caused by copy/pasting the solution from APQ8064 and
I suspect the problem is seen there too whenever someon tries to
use an interrupt on any other edge than rising (e.g. falling or
both edges).

These two patches should probably go in as fixes to make it
possible to use these interrupts properly.

This is not the only problem with the SPMI/MPP GPIO IRQs. The
most glaring problem is the numbering of the IRQ lines in the
device tree: if you want to request a GPIO from the GPIO or
MPP block on the PMIC, you have to do something like this:

mpu3050@68 {
    compatible = "invn,mpu3050";
    reg = <0x68>;
    /*
     * GPIO17 has interrupt 208 on the
     * PM8058.
     */
    interrupt-parent = <&pm8058_gpio>;
    interrupts = <208 IRQ_TYPE_EDGE_FALLING>;
...

I.e. we're not using the local IRQ HW number (17) instead the
PM-global hw number 208. This is because the GPIO subdriver
does not implement its own irqdomain, and I suspect this
should be fixed by using the hierarchical irqdomain to work
properly.

This patch set does not fix the latter issue, but I want to
highlight it in the current context. My recommendation is for
nodes using these interrupts to refer directly to the PMIC
node for the time being, as the number on the GPIO/MPP nodes
is kind of skewed.

Linus Walleij (2):
  ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
  ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs

 arch/arm/boot/dts/qcom-apq8064.dtsi | 76 +++++++++++++++++++++++++++----------
 arch/arm/boot/dts/qcom-msm8660.dtsi | 75 +++++++++++++++++++++++++++---------
 2 files changed, 114 insertions(+), 37 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2016-08-18 13:13 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05  8:38 [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags Linus Walleij
2016-08-05  8:38 ` Linus Walleij
2016-08-05  8:38 ` [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs Linus Walleij
2016-08-05  8:38   ` Linus Walleij
2016-08-05 17:56   ` John Stultz
2016-08-05 17:56     ` John Stultz
2016-08-05  8:38 ` [PATCH 2/2] ARM: dts: MSM8660 " Linus Walleij
2016-08-05  8:38   ` Linus Walleij
2016-08-17  8:56 ` [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags Linus Walleij
2016-08-17  8:56   ` Linus Walleij
2016-08-17 19:43   ` Andy Gross
2016-08-17 19:43     ` Andy Gross
2016-08-17 20:47     ` Bjorn Andersson
2016-08-17 20:47       ` Bjorn Andersson
2016-08-17 21:12       ` Andy Gross
2016-08-17 21:12         ` Andy Gross
2016-08-18 13:12     ` Linus Walleij
2016-08-18 13:12       ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.