public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@linux.intel.com>
Cc: Anton Vorontsov <cbou@mail.ru>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Linus Walleij <linus.walleij@stericsson.com>,
	patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com,
	Liam Girdwood <lrg@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] mfd: wm831x: Convert to irq_domain
Date: Fri, 18 May 2012 17:39:29 -0600	[thread overview]
Message-ID: <20120518233929.75F8E3E07C8@localhost> (raw)
In-Reply-To: <1336943936-27999-1-git-send-email-broonie@opensource.wolfsonmicro.com>

On Sun, 13 May 2012 22:18:56 +0100, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> The modern idiom is to use irq_domain to allocate interrupts. This is
> useful partly to allow further infrastructure to be based on the domains
> and partly because it makes it much easier to allocate virtual interrupts
> to devices as we don't need to allocate a contiguous range of interrupt
> numbers.
> 
> Convert the wm831x driver over to this infrastructure, using a legacy
> IRQ mapping if an irq_base is specified in platform data and otherwise
> using a linear mapping, always registering the interrupts even if they
> won't ever be used. Only boards which need to use the GPIOs as
> interrupts should need to use an irq_base.
> 
> This means that we can't use the MFD irq_base management since the
> unless we're using an explicit irq_base from platform data we can't rely
> on a linear mapping of interrupts.  Instead we need to map things via
> the irq_domain - provide a conveniencem function wm831x_irq() to save a
> small amount of typing when doing so. Looking at this I couldn't clearly
> see anything the MFD core could do to make this nicer.
> 
> Since we're not supporting device tree yet there's no meaningful
> advantage if we don't do this conversion in one, the fact that the
> interrupt resources are used for repeated IP blocks makes accessor
> functions for the irq_domain more trouble to do than they're worth.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Grant Likely <grant.likely@secretlab.ca>


      parent reply	other threads:[~2012-05-18 23:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-13 21:18 [PATCH] mfd: wm831x: Convert to irq_domain Mark Brown
2012-05-14 21:11 ` Samuel Ortiz
2012-05-18 23:39 ` Grant Likely [this message]

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=20120518233929.75F8E3E07C8@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=cbou@mail.ru \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=rtc-linux@googlegroups.com \
    --cc=sameo@linux.intel.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