linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags
Date: Fri,  5 Aug 2016 10:38:36 +0200	[thread overview]
Message-ID: <1470386318-17694-1-git-send-email-linus.walleij@linaro.org> (raw)

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

             reply	other threads:[~2016-08-05  8:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05  8:38 Linus Walleij [this message]
2016-08-05  8:38 ` [PATCH 1/2] ARM: dts: MSM8064 remove flags from SPMI/MPP IRQs Linus Walleij
2016-08-05 17:56   ` John Stultz
2016-08-05  8:38 ` [PATCH 2/2] ARM: dts: MSM8660 " Linus Walleij
2016-08-17  8:56 ` [PATCH 0/2] Fix Qualcomm 8064/8660 interrupt flags Linus Walleij
2016-08-17 19:43   ` Andy Gross
2016-08-17 20:47     ` Bjorn Andersson
2016-08-17 21:12       ` Andy Gross
2016-08-18 13:12     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470386318-17694-1-git-send-email-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).