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

* [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

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 at 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

* [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
  2016-08-05  8:38 ` Linus Walleij
@ 2016-08-05  8:38   ` Linus Walleij
  -1 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,
	stable, Ivan T . Ivanov

The Qualcomm PMIC 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.

Cc: stable@vger.kernel.org
Fixes: bce360469676 ("ARM: dts: apq8064: add pm8921 mpp support")
Fixes: 874443fe9e33 ("ARM: dts: apq8064: Add pm8921 mfd and its gpio node")
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: Linus Walleij <linus.walleij@linaro.org>
---
I vaguely remember John having problems with interrupts
on the Nexus 7 that could be related to this so involving
him on these patches.
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 76 +++++++++++++++++++++++++++----------
 1 file changed, 57 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 74a9b6c394f5..9dc83b09d987 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -5,6 +5,7 @@
 #include <dt-bindings/reset/qcom,gcc-msm8960.h>
 #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 / {
 	model = "Qualcomm APQ8064";
@@ -559,22 +560,50 @@
 					compatible = "qcom,pm8921-gpio",
 						     "qcom,ssbi-gpio";
 					reg = <0x150>;
-					interrupts = <192 1>, <193 1>, <194 1>,
-						     <195 1>, <196 1>, <197 1>,
-						     <198 1>, <199 1>, <200 1>,
-						     <201 1>, <202 1>, <203 1>,
-						     <204 1>, <205 1>, <206 1>,
-						     <207 1>, <208 1>, <209 1>,
-						     <210 1>, <211 1>, <212 1>,
-						     <213 1>, <214 1>, <215 1>,
-						     <216 1>, <217 1>, <218 1>,
-						     <219 1>, <220 1>, <221 1>,
-						     <222 1>, <223 1>, <224 1>,
-						     <225 1>, <226 1>, <227 1>,
-						     <228 1>, <229 1>, <230 1>,
-						     <231 1>, <232 1>, <233 1>,
-						     <234 1>, <235 1>;
-
+					interrupts = <192 IRQ_TYPE_NONE>,
+						     <193 IRQ_TYPE_NONE>,
+						     <194 IRQ_TYPE_NONE>,
+						     <195 IRQ_TYPE_NONE>,
+						     <196 IRQ_TYPE_NONE>,
+						     <197 IRQ_TYPE_NONE>,
+						     <198 IRQ_TYPE_NONE>,
+						     <199 IRQ_TYPE_NONE>,
+						     <200 IRQ_TYPE_NONE>,
+						     <201 IRQ_TYPE_NONE>,
+						     <202 IRQ_TYPE_NONE>,
+						     <203 IRQ_TYPE_NONE>,
+						     <204 IRQ_TYPE_NONE>,
+						     <205 IRQ_TYPE_NONE>,
+						     <206 IRQ_TYPE_NONE>,
+						     <207 IRQ_TYPE_NONE>,
+						     <208 IRQ_TYPE_NONE>,
+						     <209 IRQ_TYPE_NONE>,
+						     <210 IRQ_TYPE_NONE>,
+						     <211 IRQ_TYPE_NONE>,
+						     <212 IRQ_TYPE_NONE>,
+						     <213 IRQ_TYPE_NONE>,
+						     <214 IRQ_TYPE_NONE>,
+						     <215 IRQ_TYPE_NONE>,
+						     <216 IRQ_TYPE_NONE>,
+						     <217 IRQ_TYPE_NONE>,
+						     <218 IRQ_TYPE_NONE>,
+						     <219 IRQ_TYPE_NONE>,
+						     <220 IRQ_TYPE_NONE>,
+						     <221 IRQ_TYPE_NONE>,
+						     <222 IRQ_TYPE_NONE>,
+						     <223 IRQ_TYPE_NONE>,
+						     <224 IRQ_TYPE_NONE>,
+						     <225 IRQ_TYPE_NONE>,
+						     <226 IRQ_TYPE_NONE>,
+						     <227 IRQ_TYPE_NONE>,
+						     <228 IRQ_TYPE_NONE>,
+						     <229 IRQ_TYPE_NONE>,
+						     <230 IRQ_TYPE_NONE>,
+						     <231 IRQ_TYPE_NONE>,
+						     <232 IRQ_TYPE_NONE>,
+						     <233 IRQ_TYPE_NONE>,
+						     <234 IRQ_TYPE_NONE>,
+						     <235 IRQ_TYPE_NONE>;
 					gpio-controller;
 					#gpio-cells = <2>;
 
@@ -587,9 +616,18 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					interrupts =
-					<128 1>, <129 1>, <130 1>, <131 1>,
-					<132 1>, <133 1>, <134 1>, <135 1>,
-					<136 1>, <137 1>, <138 1>, <139 1>;
+					<128 IRQ_TYPE_NONE>,
+					<129 IRQ_TYPE_NONE>,
+					<130 IRQ_TYPE_NONE>,
+					<131 IRQ_TYPE_NONE>,
+					<132 IRQ_TYPE_NONE>,
+					<133 IRQ_TYPE_NONE>,
+					<134 IRQ_TYPE_NONE>,
+					<135 IRQ_TYPE_NONE>,
+					<136 IRQ_TYPE_NONE>,
+					<137 IRQ_TYPE_NONE>,
+					<138 IRQ_TYPE_NONE>,
+					<139 IRQ_TYPE_NONE>;
 				};
 
 				rtc@11d {
-- 
2.7.4

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

* [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
@ 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

The Qualcomm PMIC 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.

Cc: stable at vger.kernel.org
Fixes: bce360469676 ("ARM: dts: apq8064: add pm8921 mpp support")
Fixes: 874443fe9e33 ("ARM: dts: apq8064: Add pm8921 mfd and its gpio node")
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: Linus Walleij <linus.walleij@linaro.org>
---
I vaguely remember John having problems with interrupts
on the Nexus 7 that could be related to this so involving
him on these patches.
---
 arch/arm/boot/dts/qcom-apq8064.dtsi | 76 +++++++++++++++++++++++++++----------
 1 file changed, 57 insertions(+), 19 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-apq8064.dtsi b/arch/arm/boot/dts/qcom-apq8064.dtsi
index 74a9b6c394f5..9dc83b09d987 100644
--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -5,6 +5,7 @@
 #include <dt-bindings/reset/qcom,gcc-msm8960.h>
 #include <dt-bindings/clock/qcom,mmcc-msm8960.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 / {
 	model = "Qualcomm APQ8064";
@@ -559,22 +560,50 @@
 					compatible = "qcom,pm8921-gpio",
 						     "qcom,ssbi-gpio";
 					reg = <0x150>;
-					interrupts = <192 1>, <193 1>, <194 1>,
-						     <195 1>, <196 1>, <197 1>,
-						     <198 1>, <199 1>, <200 1>,
-						     <201 1>, <202 1>, <203 1>,
-						     <204 1>, <205 1>, <206 1>,
-						     <207 1>, <208 1>, <209 1>,
-						     <210 1>, <211 1>, <212 1>,
-						     <213 1>, <214 1>, <215 1>,
-						     <216 1>, <217 1>, <218 1>,
-						     <219 1>, <220 1>, <221 1>,
-						     <222 1>, <223 1>, <224 1>,
-						     <225 1>, <226 1>, <227 1>,
-						     <228 1>, <229 1>, <230 1>,
-						     <231 1>, <232 1>, <233 1>,
-						     <234 1>, <235 1>;
-
+					interrupts = <192 IRQ_TYPE_NONE>,
+						     <193 IRQ_TYPE_NONE>,
+						     <194 IRQ_TYPE_NONE>,
+						     <195 IRQ_TYPE_NONE>,
+						     <196 IRQ_TYPE_NONE>,
+						     <197 IRQ_TYPE_NONE>,
+						     <198 IRQ_TYPE_NONE>,
+						     <199 IRQ_TYPE_NONE>,
+						     <200 IRQ_TYPE_NONE>,
+						     <201 IRQ_TYPE_NONE>,
+						     <202 IRQ_TYPE_NONE>,
+						     <203 IRQ_TYPE_NONE>,
+						     <204 IRQ_TYPE_NONE>,
+						     <205 IRQ_TYPE_NONE>,
+						     <206 IRQ_TYPE_NONE>,
+						     <207 IRQ_TYPE_NONE>,
+						     <208 IRQ_TYPE_NONE>,
+						     <209 IRQ_TYPE_NONE>,
+						     <210 IRQ_TYPE_NONE>,
+						     <211 IRQ_TYPE_NONE>,
+						     <212 IRQ_TYPE_NONE>,
+						     <213 IRQ_TYPE_NONE>,
+						     <214 IRQ_TYPE_NONE>,
+						     <215 IRQ_TYPE_NONE>,
+						     <216 IRQ_TYPE_NONE>,
+						     <217 IRQ_TYPE_NONE>,
+						     <218 IRQ_TYPE_NONE>,
+						     <219 IRQ_TYPE_NONE>,
+						     <220 IRQ_TYPE_NONE>,
+						     <221 IRQ_TYPE_NONE>,
+						     <222 IRQ_TYPE_NONE>,
+						     <223 IRQ_TYPE_NONE>,
+						     <224 IRQ_TYPE_NONE>,
+						     <225 IRQ_TYPE_NONE>,
+						     <226 IRQ_TYPE_NONE>,
+						     <227 IRQ_TYPE_NONE>,
+						     <228 IRQ_TYPE_NONE>,
+						     <229 IRQ_TYPE_NONE>,
+						     <230 IRQ_TYPE_NONE>,
+						     <231 IRQ_TYPE_NONE>,
+						     <232 IRQ_TYPE_NONE>,
+						     <233 IRQ_TYPE_NONE>,
+						     <234 IRQ_TYPE_NONE>,
+						     <235 IRQ_TYPE_NONE>;
 					gpio-controller;
 					#gpio-cells = <2>;
 
@@ -587,9 +616,18 @@
 					gpio-controller;
 					#gpio-cells = <2>;
 					interrupts =
-					<128 1>, <129 1>, <130 1>, <131 1>,
-					<132 1>, <133 1>, <134 1>, <135 1>,
-					<136 1>, <137 1>, <138 1>, <139 1>;
+					<128 IRQ_TYPE_NONE>,
+					<129 IRQ_TYPE_NONE>,
+					<130 IRQ_TYPE_NONE>,
+					<131 IRQ_TYPE_NONE>,
+					<132 IRQ_TYPE_NONE>,
+					<133 IRQ_TYPE_NONE>,
+					<134 IRQ_TYPE_NONE>,
+					<135 IRQ_TYPE_NONE>,
+					<136 IRQ_TYPE_NONE>,
+					<137 IRQ_TYPE_NONE>,
+					<138 IRQ_TYPE_NONE>,
+					<139 IRQ_TYPE_NONE>;
 				};
 
 				rtc at 11d {
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs
  2016-08-05  8:38 ` Linus Walleij
@ 2016-08-05  8:38   ` Linus Walleij
  -1 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,
	Ivan T . Ivanov

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: 0840ea9e4457 ("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: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8660.dtsi | 75 ++++++++++++++++++++++++++++---------
 1 file changed, 57 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index acbe71febe13..8c65e0d82559 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -2,6 +2,7 @@
 
 /include/ "skeleton.dtsi"
 
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8660.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
@@ -159,21 +160,50 @@
 						     "qcom,ssbi-gpio";
 					reg = <0x150>;
 					interrupt-parent = <&pmicintc>;
-					interrupts = <192 1>, <193 1>, <194 1>,
-						     <195 1>, <196 1>, <197 1>,
-						     <198 1>, <199 1>, <200 1>,
-						     <201 1>, <202 1>, <203 1>,
-						     <204 1>, <205 1>, <206 1>,
-						     <207 1>, <208 1>, <209 1>,
-						     <210 1>, <211 1>, <212 1>,
-						     <213 1>, <214 1>, <215 1>,
-						     <216 1>, <217 1>, <218 1>,
-						     <219 1>, <220 1>, <221 1>,
-						     <222 1>, <223 1>, <224 1>,
-						     <225 1>, <226 1>, <227 1>,
-						     <228 1>, <229 1>, <230 1>,
-						     <231 1>, <232 1>, <233 1>,
-						     <234 1>, <235 1>;
+					interrupts = <192 IRQ_TYPE_NONE>,
+						     <193 IRQ_TYPE_NONE>,
+						     <194 IRQ_TYPE_NONE>,
+						     <195 IRQ_TYPE_NONE>,
+						     <196 IRQ_TYPE_NONE>,
+						     <197 IRQ_TYPE_NONE>,
+						     <198 IRQ_TYPE_NONE>,
+						     <199 IRQ_TYPE_NONE>,
+						     <200 IRQ_TYPE_NONE>,
+						     <201 IRQ_TYPE_NONE>,
+						     <202 IRQ_TYPE_NONE>,
+						     <203 IRQ_TYPE_NONE>,
+						     <204 IRQ_TYPE_NONE>,
+						     <205 IRQ_TYPE_NONE>,
+						     <206 IRQ_TYPE_NONE>,
+						     <207 IRQ_TYPE_NONE>,
+						     <208 IRQ_TYPE_NONE>,
+						     <209 IRQ_TYPE_NONE>,
+						     <210 IRQ_TYPE_NONE>,
+						     <211 IRQ_TYPE_NONE>,
+						     <212 IRQ_TYPE_NONE>,
+						     <213 IRQ_TYPE_NONE>,
+						     <214 IRQ_TYPE_NONE>,
+						     <215 IRQ_TYPE_NONE>,
+						     <216 IRQ_TYPE_NONE>,
+						     <217 IRQ_TYPE_NONE>,
+						     <218 IRQ_TYPE_NONE>,
+						     <219 IRQ_TYPE_NONE>,
+						     <220 IRQ_TYPE_NONE>,
+						     <221 IRQ_TYPE_NONE>,
+						     <222 IRQ_TYPE_NONE>,
+						     <223 IRQ_TYPE_NONE>,
+						     <224 IRQ_TYPE_NONE>,
+						     <225 IRQ_TYPE_NONE>,
+						     <226 IRQ_TYPE_NONE>,
+						     <227 IRQ_TYPE_NONE>,
+						     <228 IRQ_TYPE_NONE>,
+						     <229 IRQ_TYPE_NONE>,
+						     <230 IRQ_TYPE_NONE>,
+						     <231 IRQ_TYPE_NONE>,
+						     <232 IRQ_TYPE_NONE>,
+						     <233 IRQ_TYPE_NONE>,
+						     <234 IRQ_TYPE_NONE>,
+						     <235 IRQ_TYPE_NONE>;
 					gpio-controller;
 					#gpio-cells = <2>;
 
@@ -187,9 +217,18 @@
 					#gpio-cells = <2>;
 					interrupt-parent = <&pmicintc>;
 					interrupts =
-					<128 1>, <129 1>, <130 1>, <131 1>,
-					<132 1>, <133 1>, <134 1>, <135 1>,
-					<136 1>, <137 1>, <138 1>, <139 1>;
+					<128 IRQ_TYPE_NONE>,
+					<129 IRQ_TYPE_NONE>,
+					<130 IRQ_TYPE_NONE>,
+					<131 IRQ_TYPE_NONE>,
+					<132 IRQ_TYPE_NONE>,
+					<133 IRQ_TYPE_NONE>,
+					<134 IRQ_TYPE_NONE>,
+					<135 IRQ_TYPE_NONE>,
+					<136 IRQ_TYPE_NONE>,
+					<137 IRQ_TYPE_NONE>,
+					<138 IRQ_TYPE_NONE>,
+					<139 IRQ_TYPE_NONE>;
 				};
 
 				pwrkey@1c {
-- 
2.7.4

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

* [PATCH 2/2] ARM: dts: MSM8660 remove flags from SPMI/MPP IRQs
@ 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

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: 0840ea9e4457 ("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: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/qcom-msm8660.dtsi | 75 ++++++++++++++++++++++++++++---------
 1 file changed, 57 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index acbe71febe13..8c65e0d82559 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -2,6 +2,7 @@
 
 /include/ "skeleton.dtsi"
 
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/clock/qcom,gcc-msm8660.h>
 #include <dt-bindings/soc/qcom,gsbi.h>
@@ -159,21 +160,50 @@
 						     "qcom,ssbi-gpio";
 					reg = <0x150>;
 					interrupt-parent = <&pmicintc>;
-					interrupts = <192 1>, <193 1>, <194 1>,
-						     <195 1>, <196 1>, <197 1>,
-						     <198 1>, <199 1>, <200 1>,
-						     <201 1>, <202 1>, <203 1>,
-						     <204 1>, <205 1>, <206 1>,
-						     <207 1>, <208 1>, <209 1>,
-						     <210 1>, <211 1>, <212 1>,
-						     <213 1>, <214 1>, <215 1>,
-						     <216 1>, <217 1>, <218 1>,
-						     <219 1>, <220 1>, <221 1>,
-						     <222 1>, <223 1>, <224 1>,
-						     <225 1>, <226 1>, <227 1>,
-						     <228 1>, <229 1>, <230 1>,
-						     <231 1>, <232 1>, <233 1>,
-						     <234 1>, <235 1>;
+					interrupts = <192 IRQ_TYPE_NONE>,
+						     <193 IRQ_TYPE_NONE>,
+						     <194 IRQ_TYPE_NONE>,
+						     <195 IRQ_TYPE_NONE>,
+						     <196 IRQ_TYPE_NONE>,
+						     <197 IRQ_TYPE_NONE>,
+						     <198 IRQ_TYPE_NONE>,
+						     <199 IRQ_TYPE_NONE>,
+						     <200 IRQ_TYPE_NONE>,
+						     <201 IRQ_TYPE_NONE>,
+						     <202 IRQ_TYPE_NONE>,
+						     <203 IRQ_TYPE_NONE>,
+						     <204 IRQ_TYPE_NONE>,
+						     <205 IRQ_TYPE_NONE>,
+						     <206 IRQ_TYPE_NONE>,
+						     <207 IRQ_TYPE_NONE>,
+						     <208 IRQ_TYPE_NONE>,
+						     <209 IRQ_TYPE_NONE>,
+						     <210 IRQ_TYPE_NONE>,
+						     <211 IRQ_TYPE_NONE>,
+						     <212 IRQ_TYPE_NONE>,
+						     <213 IRQ_TYPE_NONE>,
+						     <214 IRQ_TYPE_NONE>,
+						     <215 IRQ_TYPE_NONE>,
+						     <216 IRQ_TYPE_NONE>,
+						     <217 IRQ_TYPE_NONE>,
+						     <218 IRQ_TYPE_NONE>,
+						     <219 IRQ_TYPE_NONE>,
+						     <220 IRQ_TYPE_NONE>,
+						     <221 IRQ_TYPE_NONE>,
+						     <222 IRQ_TYPE_NONE>,
+						     <223 IRQ_TYPE_NONE>,
+						     <224 IRQ_TYPE_NONE>,
+						     <225 IRQ_TYPE_NONE>,
+						     <226 IRQ_TYPE_NONE>,
+						     <227 IRQ_TYPE_NONE>,
+						     <228 IRQ_TYPE_NONE>,
+						     <229 IRQ_TYPE_NONE>,
+						     <230 IRQ_TYPE_NONE>,
+						     <231 IRQ_TYPE_NONE>,
+						     <232 IRQ_TYPE_NONE>,
+						     <233 IRQ_TYPE_NONE>,
+						     <234 IRQ_TYPE_NONE>,
+						     <235 IRQ_TYPE_NONE>;
 					gpio-controller;
 					#gpio-cells = <2>;
 
@@ -187,9 +217,18 @@
 					#gpio-cells = <2>;
 					interrupt-parent = <&pmicintc>;
 					interrupts =
-					<128 1>, <129 1>, <130 1>, <131 1>,
-					<132 1>, <133 1>, <134 1>, <135 1>,
-					<136 1>, <137 1>, <138 1>, <139 1>;
+					<128 IRQ_TYPE_NONE>,
+					<129 IRQ_TYPE_NONE>,
+					<130 IRQ_TYPE_NONE>,
+					<131 IRQ_TYPE_NONE>,
+					<132 IRQ_TYPE_NONE>,
+					<133 IRQ_TYPE_NONE>,
+					<134 IRQ_TYPE_NONE>,
+					<135 IRQ_TYPE_NONE>,
+					<136 IRQ_TYPE_NONE>,
+					<137 IRQ_TYPE_NONE>,
+					<138 IRQ_TYPE_NONE>,
+					<139 IRQ_TYPE_NONE>;
 				};
 
 				pwrkey at 1c {
-- 
2.7.4

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

* Re: [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
  2016-08-05  8:38   ` Linus Walleij
@ 2016-08-05 17:56     ` John Stultz
  -1 siblings, 0 replies; 18+ messages in thread
From: John Stultz @ 2016-08-05 17:56 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-arm-kernel, linux-arm-msm, linux-soc, Andy Gross,
	Srinivas Kandagatla, Stephen Boyd, Bjorn Andersson, David Brown,
	stable, Ivan T . Ivanov

On Fri, Aug 5, 2016 at 1:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> The Qualcomm PMIC 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.
>
> Cc: stable@vger.kernel.org
> Fixes: bce360469676 ("ARM: dts: apq8064: add pm8921 mpp support")
> Fixes: 874443fe9e33 ("ARM: dts: apq8064: Add pm8921 mfd and its gpio node")
> 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: Linus Walleij <linus.walleij@linaro.org>
> ---
> I vaguely remember John having problems with interrupts
> on the Nexus 7 that could be related to this so involving
> him on these patches.

Yea. Thanks for including me. Unfortunately these patches don't
resolve the problem I'm seeing (I still don't get any interrupts from
the volume/power buttons), and I still have to revert "irqdomain:
Don't set type when mapping an IRQ" to get things working.

thanks
-john

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

* [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs
@ 2016-08-05 17:56     ` John Stultz
  0 siblings, 0 replies; 18+ messages in thread
From: John Stultz @ 2016-08-05 17:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 5, 2016 at 1:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> The Qualcomm PMIC 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.
>
> Cc: stable at vger.kernel.org
> Fixes: bce360469676 ("ARM: dts: apq8064: add pm8921 mpp support")
> Fixes: 874443fe9e33 ("ARM: dts: apq8064: Add pm8921 mfd and its gpio node")
> 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: Linus Walleij <linus.walleij@linaro.org>
> ---
> I vaguely remember John having problems with interrupts
> on the Nexus 7 that could be related to this so involving
> him on these patches.

Yea. Thanks for including me. Unfortunately these patches don't
resolve the problem I'm seeing (I still don't get any interrupts from
the volume/power buttons), and I still have to revert "irqdomain:
Don't set type when mapping an IRQ" to get things working.

thanks
-john

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

* Re: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
  2016-08-05  8:38 ` Linus Walleij
@ 2016-08-17  8:56   ` Linus Walleij
  -1 siblings, 0 replies; 18+ messages in thread
From: Linus Walleij @ 2016-08-17  8:56 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

On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:

> 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.

Andy are you funneling these two patches for fixes?

Yours,
Linus Walleij

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

* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-17  8:56   ` Linus Walleij
  0 siblings, 0 replies; 18+ messages in thread
From: Linus Walleij @ 2016-08-17  8:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:

> 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.

Andy are you funneling these two patches for fixes?

Yours,
Linus Walleij

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

* Re: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
  2016-08-17  8:56   ` Linus Walleij
@ 2016-08-17 19:43     ` Andy Gross
  -1 siblings, 0 replies; 18+ messages in thread
From: Andy Gross @ 2016-08-17 19:43 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-arm-kernel, linux-arm-msm, linux-soc, John Stultz,
	Srinivas Kandagatla, Stephen Boyd, Bjorn Andersson, David Brown

On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > 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.
> 
> Andy are you funneling these two patches for fixes?

I looked at these last night.  What's the outcome of John's issues with the
patch not fixing his problem?  Do these need to be taken irrespective of his
plight?

Andy

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

* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-17 19:43     ` Andy Gross
  0 siblings, 0 replies; 18+ messages in thread
From: Andy Gross @ 2016-08-17 19:43 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > 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.
> 
> Andy are you funneling these two patches for fixes?

I looked at these last night.  What's the outcome of John's issues with the
patch not fixing his problem?  Do these need to be taken irrespective of his
plight?

Andy

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

* Re: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
  2016-08-17 19:43     ` Andy Gross
@ 2016-08-17 20:47       ` Bjorn Andersson
  -1 siblings, 0 replies; 18+ messages in thread
From: Bjorn Andersson @ 2016-08-17 20:47 UTC (permalink / raw)
  To: Andy Gross
  Cc: Linus Walleij, linux-arm-kernel, linux-arm-msm, linux-soc,
	John Stultz, Srinivas Kandagatla, Stephen Boyd, David Brown

On Wed 17 Aug 12:43 PDT 2016, Andy Gross wrote:

> On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> > On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> > 
> > > 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.
> > 
> > Andy are you funneling these two patches for fixes?
> 
> I looked at these last night.  What's the outcome of John's issues with the
> patch not fixing his problem?  Do these need to be taken irrespective of his
> plight?
> 

John's issue was that the order of operations was changed in the IRQ
framework, so that upon passing through the set_type() in the TLMM
driver I would overwrite, and hence disable, the chained IRQ handler -
as I should.

As the PMIC interrupt is chained from the TLMM no interrupts was
delivered.


So please move forward with these changes.

Regards,
Bjorn

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

* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-17 20:47       ` Bjorn Andersson
  0 siblings, 0 replies; 18+ messages in thread
From: Bjorn Andersson @ 2016-08-17 20:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed 17 Aug 12:43 PDT 2016, Andy Gross wrote:

> On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> > On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> > 
> > > 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.
> > 
> > Andy are you funneling these two patches for fixes?
> 
> I looked at these last night.  What's the outcome of John's issues with the
> patch not fixing his problem?  Do these need to be taken irrespective of his
> plight?
> 

John's issue was that the order of operations was changed in the IRQ
framework, so that upon passing through the set_type() in the TLMM
driver I would overwrite, and hence disable, the chained IRQ handler -
as I should.

As the PMIC interrupt is chained from the TLMM no interrupts was
delivered.


So please move forward with these changes.

Regards,
Bjorn

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

* Re: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
  2016-08-17 20:47       ` Bjorn Andersson
@ 2016-08-17 21:12         ` Andy Gross
  -1 siblings, 0 replies; 18+ messages in thread
From: Andy Gross @ 2016-08-17 21:12 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: linux-arm-msm, Linus Walleij, Stephen Boyd, David Brown,
	John Stultz, Srinivas Kandagatla, linux-soc, linux-arm-kernel

On Wed, Aug 17, 2016 at 01:47:40PM -0700, Bjorn Andersson wrote:
> On Wed 17 Aug 12:43 PDT 2016, Andy Gross wrote:
> 
> > On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> > > On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> > > 
> > > > 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.
> > > 
> > > Andy are you funneling these two patches for fixes?
> > 
> > I looked at these last night.  What's the outcome of John's issues with the
> > patch not fixing his problem?  Do these need to be taken irrespective of his
> > plight?
> > 
> 
> John's issue was that the order of operations was changed in the IRQ
> framework, so that upon passing through the set_type() in the TLMM
> driver I would overwrite, and hence disable, the chained IRQ handler -
> as I should.
> 
> As the PMIC interrupt is chained from the TLMM no interrupts was
> delivered.
> 
> 
> So please move forward with these changes.

Ah ok.  I'll queue these up.

Andy

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

* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-17 21:12         ` Andy Gross
  0 siblings, 0 replies; 18+ messages in thread
From: Andy Gross @ 2016-08-17 21:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 17, 2016 at 01:47:40PM -0700, Bjorn Andersson wrote:
> On Wed 17 Aug 12:43 PDT 2016, Andy Gross wrote:
> 
> > On Wed, Aug 17, 2016 at 10:56:22AM +0200, Linus Walleij wrote:
> > > On Fri, Aug 5, 2016 at 10:38 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> > > 
> > > > 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.
> > > 
> > > Andy are you funneling these two patches for fixes?
> > 
> > I looked at these last night.  What's the outcome of John's issues with the
> > patch not fixing his problem?  Do these need to be taken irrespective of his
> > plight?
> > 
> 
> John's issue was that the order of operations was changed in the IRQ
> framework, so that upon passing through the set_type() in the TLMM
> driver I would overwrite, and hence disable, the chained IRQ handler -
> as I should.
> 
> As the PMIC interrupt is chained from the TLMM no interrupts was
> delivered.
> 
> 
> So please move forward with these changes.

Ah ok.  I'll queue these up.

Andy

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

* Re: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
  2016-08-17 19:43     ` Andy Gross
@ 2016-08-18 13:12       ` Linus Walleij
  -1 siblings, 0 replies; 18+ messages in thread
From: Linus Walleij @ 2016-08-18 13:12 UTC (permalink / raw)
  To: Andy Gross
  Cc: linux-arm-kernel, linux-arm-msm, linux-soc, John Stultz,
	Srinivas Kandagatla, Stephen Boyd, Bjorn Andersson, David Brown

On Wed, Aug 17, 2016 at 9:43 PM, Andy Gross <andy.gross@linaro.org> wrote:

> I looked at these last night.  What's the outcome of John's issues with the
> patch not fixing his problem?  Do these need to be taken irrespective of his
> plight?

As Björn stated, an orthogonal issue. This other issue still persists.
Thanks for queueing!

Yours,
Linus Walleij

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

* [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
@ 2016-08-18 13:12       ` Linus Walleij
  0 siblings, 0 replies; 18+ messages in thread
From: Linus Walleij @ 2016-08-18 13:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Aug 17, 2016 at 9:43 PM, Andy Gross <andy.gross@linaro.org> wrote:

> I looked at these last night.  What's the outcome of John's issues with the
> patch not fixing his problem?  Do these need to be taken irrespective of his
> plight?

As Bj?rn stated, an orthogonal issue. This other issue still persists.
Thanks for queueing!

Yours,
Linus Walleij

^ 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.