* [PATCH] gpio: tegra: Fix build issue due to irq_domain rework. @ 2012-02-13 23:21 Stephen Warren 2012-02-24 23:12 ` Stephen Warren 0 siblings, 1 reply; 4+ messages in thread From: Stephen Warren @ 2012-02-13 23:21 UTC (permalink / raw) To: Grant Likely, Linus Walleij Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the ppc one" changed the set of available irq domain APIs. Update the Tegra GPIO driver to account for those changes, to solve a build break. Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- With this patch, next-20120206 works. There are one or two other issues that prevent more recent nexts from working though; I'm still tracking those down. However, I think this patch is fine by itself, since it solves all issues in next-20120206. drivers/gpio/gpio-tegra.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 98f3980..6f17671 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -75,7 +75,7 @@ struct tegra_gpio_bank { #endif }; -static struct irq_domain irq_domain; +static struct irq_domain *irq_domain; static void __iomem *regs; static u32 tegra_gpio_bank_count; static struct tegra_gpio_bank *tegra_gpio_banks; @@ -141,7 +141,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset, static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset) { - return irq_domain_to_irq(&irq_domain, offset); + return irq_find_mapping(irq_domain, offset); } static struct gpio_chip tegra_gpio_chip = { @@ -372,11 +372,9 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n"); return -ENODEV; } - irq_domain.irq_base = irq_base; - irq_domain.nr_irq = tegra_gpio_chip.ngpio; - irq_domain.ops = &irq_domain_simple_ops; - irq_domain.of_node = pdev->dev.of_node; - irq_domain_add(&irq_domain); + irq_domain = irq_domain_add_legacy(pdev->dev.of_node, + tegra_gpio_chip.ngpio, irq_base, 0, + &irq_domain_simple_ops, NULL); for (i = 0; i < tegra_gpio_bank_count; i++) { res = platform_get_resource(pdev, IORESOURCE_IRQ, i); @@ -416,7 +414,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev) gpiochip_add(&tegra_gpio_chip); for (gpio = 0; gpio < tegra_gpio_chip.ngpio; gpio++) { - int irq = irq_domain_to_irq(&irq_domain, gpio); + int irq = irq_find_mapping(irq_domain, gpio); /* No validity check; all Tegra GPIOs are valid IRQs */ bank = &tegra_gpio_banks[GPIO_BANK(gpio)]; -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH] gpio: tegra: Fix build issue due to irq_domain rework. 2012-02-13 23:21 [PATCH] gpio: tegra: Fix build issue due to irq_domain rework Stephen Warren @ 2012-02-24 23:12 ` Stephen Warren [not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17BD8BCE0C-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Stephen Warren @ 2012-02-24 23:12 UTC (permalink / raw) To: Grant Likely, Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Stephen Warren wrote at Monday, February 13, 2012 4:21 PM: > Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the > ppc one" changed the set of available irq domain APIs. Update the Tegra > GPIO driver to account for those changes, to solve a build break. Grant, Linus, Could this please be checked in; linux-next since about Feb 6th doesn't build for Tegra without it. Thanks. -- nvpublic ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <74CDBE0F657A3D45AFBB94109FB122FF17BD8BCE0C-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>]
* Re: [PATCH] gpio: tegra: Fix build issue due to irq_domain rework. [not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17BD8BCE0C-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org> @ 2012-02-24 23:29 ` Grant Likely [not found] ` <20120224232942.GL25293-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Grant Likely @ 2012-02-24 23:29 UTC (permalink / raw) To: Stephen Warren Cc: Linus Walleij, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Olof Johansson On Fri, Feb 24, 2012 at 03:12:37PM -0800, Stephen Warren wrote: > Stephen Warren wrote at Monday, February 13, 2012 4:21 PM: > > Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the > > ppc one" changed the set of available irq domain APIs. Update the Tegra > > GPIO driver to account for those changes, to solve a build break. > > Grant, Linus, > > Could this please be checked in; linux-next since about Feb 6th doesn't > build for Tegra without it. This doesn't apply against the gpio tree since I didn't pick up the DT patches. It looks like Olof did. (3391811c & 6f74dc9bc). The irq_domain branch is stable now, so it can be merged into the arm-soc tree before applying this patch. g. ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <20120224232942.GL25293-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>]
* Re: [PATCH] gpio: tegra: Fix build issue due to irq_domain rework. [not found] ` <20120224232942.GL25293-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org> @ 2012-02-26 21:23 ` Olof Johansson 0 siblings, 0 replies; 4+ messages in thread From: Olof Johansson @ 2012-02-26 21:23 UTC (permalink / raw) To: Grant Likely Cc: Stephen Warren, Linus Walleij, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, arm-DgEjT+Ai2ygdnm+yROfE0A On Fri, Feb 24, 2012 at 3:29 PM, Grant Likely <grant.likely@secretlab.ca> wrote: > On Fri, Feb 24, 2012 at 03:12:37PM -0800, Stephen Warren wrote: >> Stephen Warren wrote at Monday, February 13, 2012 4:21 PM: >> > Commit 7da5a66 "irq_domain: Remove 'new' irq_domain in favour of the >> > ppc one" changed the set of available irq domain APIs. Update the Tegra >> > GPIO driver to account for those changes, to solve a build break. >> >> Grant, Linus, >> >> Could this please be checked in; linux-next since about Feb 6th doesn't >> build for Tegra without it. > > This doesn't apply against the gpio tree since I didn't pick up the DT patches. > It looks like Olof did. (3391811c & 6f74dc9bc). The irq_domain branch is > stable now, so it can be merged into the arm-soc tree before applying this > patch. Yep, can do. Just to clarify, the branch that is guaranteed to be stable is irqdomain/next on your linux-2.6 repo? -Olof ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-26 21:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 23:21 [PATCH] gpio: tegra: Fix build issue due to irq_domain rework Stephen Warren
2012-02-24 23:12 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF17BD8BCE0C-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-02-24 23:29 ` Grant Likely
[not found] ` <20120224232942.GL25293-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2012-02-26 21:23 ` Olof Johansson
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).