From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/10] sh-pfc: Fix GPIO to IRQ mapping
Date: Thu, 12 Dec 2013 14:15:35 +0100 [thread overview]
Message-ID: <1537589.LVeLx3Dqtn@avalon> (raw)
In-Reply-To: <20131212131139.GE30624@verge.net.au>
Hi Simon,
On Thursday 12 December 2013 22:11:39 Simon Horman wrote:
> On Wed, Dec 11, 2013 at 04:26:20AM +0100, Laurent Pinchart wrote:
> > Hello,
> >
> > This patch set fixes conversion from a GPIO number to an IRQ number in the
> > sh-pfc driver in the device tree case.
> >
> > Patches 01/10 to 05/10 clean up the driver to prepare it for the core fix
> > in patch 06/10. As explained in patch 06/10 commit message, on non-DT
> > platforms IRQ controllers associated with the GPIOs have a fixed IRQ base
> > value known at compile time. The sh-pfc driver translates GPIO number to
> > IRQ numbers using a hardcoded table. This mechanism breaks on DT
> > platforms, as the IRQ base values are dynamic in that case.
> >
> > The patch set fixes this by specifying IRQs associated with GPIOs in IRQ
> > resources, populated automatically from the device tree. When IRQ
> > resources
> > are specified the driver requires one IRQ resource per GPIO able to
> > generate an interrupt, and uses the translation table to compute the IRQ
> > resource offset instead of the IRQ number.
> >
> > Patches 07/10 to 09/10 then add PFC interrupts in DT for the SH73A0,
> > R8A73A4 and R9A7740 SoCs. The only missing platform here is SH7372 due to
> > its very uncomplete DT support. All other Renesas ARM platforms use a
> > standaline GPIO driver and are thus not affected.
>
> s/uncomplete/incomplete/
>
> > Patch 10/10 finally adds a gpio-keys device to the Armadillo board DTS,
> > allowing the whole patch set to the tested.
> >
> > The sh-pfc changes need to be merged first. Linus, could you please
> > provide a stable branch with the first 6 patches when you will apply them
> > to your tree ?
>
> It seems to me that if Linus applies the pfc changes the
> shmobile changes could be applied independently. Am I missing
> and do the shmobile patches have build-dependencies on the pfc patches?
The DTS patches will result in the PFC platform device having IRQ resources.
The sh-pfc driver currently supports MEM resources only and will crash.
> > Laurent Pinchart (10):
> > sh-pfc: Turn unsigned indices into unsigned int
> > sh-pfc: Terminate gpios array by -1
> > sh-pfc: sh73a0: Add missing IRQ15
> > sh-pfc: sh73a0: Sort IRQ entries by IRQ number
> > sh-pfc: Rename sh_pfc window field to windows
> > sh-pfc: Support GPIO to IRQ mapping specified IRQ resources
> > ARM: shmobile: r8a73a4: Specify PFC interrupts in DT
> > ARM: shmobile: r8a7740: Specify PFC interrupts in DT
> > ARM: shmobile: sh73a0: Specify PFC interrupts in DT
> > ARM: shmobile: armadillo: dts: Add gpio-keys device
> >
> > .../bindings/pinctrl/renesas,pfc-pinctrl.txt | 14 ++++
> > arch/arm/boot/dts/r8a73a4.dtsi | 16 +++++
> > .../boot/dts/r8a7740-armadillo800eva-reference.dts | 29 +++++++++
> > arch/arm/boot/dts/r8a7740.dtsi | 9 +++
> > arch/arm/boot/dts/sh73a0.dtsi | 9 +++
> > drivers/pinctrl/sh-pfc/core.c | 76 +++++++++++------
> > drivers/pinctrl/sh-pfc/core.h | 4 +-
> > drivers/pinctrl/sh-pfc/gpio.c | 24 +++++--
> > drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 4 +-
> > drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 +-
> > drivers/pinctrl/sh-pfc/pfc-sh7372.c | 2 +-
> > drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 54 +++++++--------
> > drivers/pinctrl/sh-pfc/sh_pfc.h | 4 +-
> > 13 files changed, 188 insertions(+), 59 deletions(-)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-12-12 13:15 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 3:26 [PATCH 00/10] sh-pfc: Fix GPIO to IRQ mapping Laurent Pinchart
2013-12-11 3:26 ` [PATCH 01/10] sh-pfc: Turn unsigned indices into unsigned int Laurent Pinchart
2013-12-12 19:16 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 02/10] sh-pfc: Terminate gpios array by -1 Laurent Pinchart
2013-12-12 19:36 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 03/10] sh-pfc: sh73a0: Add missing IRQ15 Laurent Pinchart
2013-12-12 19:37 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 04/10] sh-pfc: sh73a0: Sort IRQ entries by IRQ number Laurent Pinchart
2013-12-12 19:38 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 05/10] sh-pfc: Rename sh_pfc window field to windows Laurent Pinchart
2013-12-12 19:39 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 06/10] sh-pfc: Support GPIO to IRQ mapping specified IRQ resources Laurent Pinchart
2013-12-12 19:43 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 07/10] ARM: shmobile: r8a73a4: Specify PFC interrupts in DT Laurent Pinchart
2013-12-12 19:44 ` Linus Walleij
2013-12-11 3:26 ` [PATCH 08/10] ARM: shmobile: r8a7740: " Laurent Pinchart
2013-12-11 3:26 ` [PATCH 09/10] ARM: shmobile: sh73a0: " Laurent Pinchart
2013-12-11 3:26 ` [PATCH 10/10] ARM: shmobile: armadillo: dts: Add gpio-keys device Laurent Pinchart
2013-12-11 9:50 ` [PATCH 00/10] sh-pfc: Fix GPIO to IRQ mapping Magnus Damm
2013-12-12 13:11 ` Simon Horman
2013-12-12 13:15 ` Laurent Pinchart [this message]
2013-12-12 13:41 ` Simon Horman
2013-12-12 21:05 ` Linus Walleij
2013-12-13 0:14 ` Simon Horman
2013-12-19 6:40 ` Simon Horman
2013-12-23 17:27 ` Linus Walleij
2013-12-24 6:47 ` Simon Horman
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=1537589.LVeLx3Dqtn@avalon \
--to=laurent.pinchart@ideasonboard.com \
--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