From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Grant Likely <grant.likely@secretlab.ca>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH 3/4 v2] gpio/mvebu: convert to use irq_domain_add_simple()
Date: Sat, 20 Oct 2012 17:20:01 +0200 [thread overview]
Message-ID: <20121020152001.GE21046@lunn.ch> (raw)
In-Reply-To: <1350644042-31793-1-git-send-email-linus.walleij@linaro.org>
On Fri, Oct 19, 2012 at 12:54:02PM +0200, Linus Walleij wrote:
> The MVEBU driver probably just wants a few IRQs. Using the simple
> domain has the upside of allocating IRQ descriptors if need be,
> especially in a SPARSE_IRQ environment.
>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
> Cc: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v1->v2:
> - Keep irq_create_mapping() and do not replace with
> irq_find_mapping() - if a linear domain is the outcome,
> we really need to allocate a descriptor on the first mapping
> call.
> ---
> drivers/gpio/gpio-mvebu.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
> index 902af43..e0bde06 100644
> --- a/drivers/gpio/gpio-mvebu.c
> +++ b/drivers/gpio/gpio-mvebu.c
> @@ -645,8 +645,8 @@ static int __devinit mvebu_gpio_probe(struct platform_device *pdev)
> IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
>
> /* Setup irq domain on top of the generic chip. */
> - mvchip->domain = irq_domain_add_legacy(np, mvchip->chip.ngpio,
> - mvchip->irqbase, 0,
> + mvchip->domain = irq_domain_add_simple(np, mvchip->chip.ngpio,
> + mvchip->irqbase,
> &irq_domain_simple_ops,
> mvchip);
> if (!mvchip->domain) {
> --
> 1.7.11.7
>
Hi Linus
I tested this on a kirkwood QNAP NAS box. gpio-keys still work and
generate interrupts etc.
Tested-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2012-10-20 15:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 10:54 Linus Walleij
2012-10-20 15:20 ` Andrew Lunn [this message]
2012-11-21 15:03 ` Grant Likely
2012-12-11 15:20 ` Thomas Petazzoni
2012-12-12 7:56 ` Linus Walleij
2012-12-12 9:16 ` Thomas Petazzoni
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=20121020152001.GE21046@lunn.ch \
--to=andrew@lunn.ch \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=sebastian.hesselbarth@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
/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
Powered by JetHome