mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@ti.com>,
	linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH 3/3] regmap: enhance regmap-irq to handle 1 IRQ feeding n chips
Date: Mon, 30 Jul 2012 11:00:04 -0600	[thread overview]
Message-ID: <5016BD94.4080302@wwwdotorg.org> (raw)
In-Reply-To: <20120729203636.GE4384@opensource.wolfsonmicro.com>

On 07/29/2012 02:36 PM, Mark Brown wrote:
> On Fri, Jul 27, 2012 at 01:01:56PM -0600, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> Some devices contain a single interrupt output, and multiple separate
>> interrupt controllers that all trigger that interrupt output, yet provide
>> no top-level interrupt controller/registers to allow determination of
>> which child interrupt controller caused the interrupt.
> 
> This isn't really anything to do with regmap, it's about implementing
> shared IRQ support for threaded interrupts.  This is generally useful
> and shouldn't be tied to regmap, it's common enough for hardware
> designers to want to use wired or interrupts and it's a limitation of
> Linux that it can't cope currently.
> 
> If are were going to implement it in regmap we shouldn't be faffing
> around setting up the virtual interrupts, we should just do the right
> thing and call round all the chips without bouncing it through the IRQ
> core.

OK, so more like how the max8907.c patch I posted did it than the
pre-existing arizona.c that I converted did it.

I had implemented this in regmap since you'd specifically mentioned
doing that. If I convert the code not to use separate IRQ domains for
this, would that be acceptable?

>> +static irqreturn_t regmaps_irq_thread(int irq, void *data)
>> +{
>> +	struct regmap_irq_chips_data *d = data;
>> +	int ret, i;
>> +
>> +	ret = pm_runtime_get_sync(d->dev);
>> +	if (ret < 0) {
> 
> This is conditional in the core regmap runtime PM support, it may be
> actively harmful if the device doesn't need it.

Hmmm. I actually don't see any pm_*() usage in regmap right now. I
assume this /is/ needed to convert arizona.c, since it's making these
calls today. I don't need it for max8907.c. Should I add another flag to
regmap_add_irq_chips() indicating whether this is needed, or ...?

  reply	other threads:[~2012-07-30 17:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 19:01 [PATCH 1/3] regmap: fix some error messages to take account of irq_reg_stride Stephen Warren
2012-07-27 19:01 ` [PATCH 2/3] regmap: implement irq chip suspend/resume operations Stephen Warren
2012-07-29 21:04   ` Mark Brown
2012-07-30 17:10     ` Stephen Warren
2012-07-30 17:38       ` Mark Brown
2012-07-31 19:25         ` Stephen Warren
2012-08-01 13:56           ` Mark Brown
2012-07-27 19:01 ` [PATCH 3/3] regmap: enhance regmap-irq to handle 1 IRQ feeding n chips Stephen Warren
2012-07-29 20:36   ` Mark Brown
2012-07-30 17:00     ` Stephen Warren [this message]
2012-07-30 17:25       ` Mark Brown
2012-07-31 23:18         ` Stephen Warren
2012-08-01 11:41           ` Mark Brown
2012-08-01 13:56 ` [PATCH 1/3] regmap: fix some error messages to take account of irq_reg_stride Mark Brown

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=5016BD94.4080302@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=sameo@linux.intel.com \
    --cc=swarren@nvidia.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