All of lore.kernel.org
 help / color / mirror / Atom feed
* [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()?
@ 2014-01-11  4:15 Yi Zhang
  2014-01-14 21:06 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Zhang @ 2014-01-11  4:15 UTC (permalink / raw)
  To: Mark Brown; +Cc: Yi Zhang, hongfeng, linux-kernel, zhouqiao

Hi, Mark:

Sorry to trouble you;
I have a question about the regmap_add_irq_chip():
at present, we use the default primary interrupt handler to handle the
parent interrupt from a mfd device;

I met a scenario:
As soon as the interrupt is triggered, a wakelock is needed to be held
until the threaded handler finishes,
I think we may hold it in the primary interrupt handler, but now it's
NULL by default;

so could we make the the primary interrupt handler configurable? for
example, add a parameter to regmap_add_irq_chip(),
then the user can choose to use current solution or his/her own handler;

what do you think?
could you please share your opinion?

thanks very much;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()?
  2014-01-11  4:15 [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()? Yi Zhang
@ 2014-01-14 21:06 ` Mark Brown
  2014-01-16 11:33   ` Yi Zhang
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2014-01-14 21:06 UTC (permalink / raw)
  To: Yi Zhang; +Cc: Yi Zhang, hongfeng, linux-kernel, zhouqiao

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

On Sat, Jan 11, 2014 at 12:15:21PM +0800, Yi Zhang wrote:

> I met a scenario:
> As soon as the interrupt is triggered, a wakelock is needed to be held
> until the threaded handler finishes,
> I think we may hold it in the primary interrupt handler, but now it's
> NULL by default;

This sounds like something we should just support in the core, though to
be honest I'd expect the interrupt core to hold a wakelock itself during
interrupt processing.  If we're doing it in regmap then allowing the
caller to set a wakelock to hold seems better than making them all write
the code to take and release it.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()?
  2014-01-14 21:06 ` Mark Brown
@ 2014-01-16 11:33   ` Yi Zhang
  2014-01-16 14:01     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Yi Zhang @ 2014-01-16 11:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Yi Zhang, hongfeng, linux-kernel, zhouqiao

2014/1/15 Mark Brown <broonie@kernel.org>:
> On Sat, Jan 11, 2014 at 12:15:21PM +0800, Yi Zhang wrote:
>
>> I met a scenario:
>> As soon as the interrupt is triggered, a wakelock is needed to be held
>> until the threaded handler finishes,
>> I think we may hold it in the primary interrupt handler, but now it's
>> NULL by default;
>
> This sounds like something we should just support in the core, though to
Sorry, I'm not clear about this, you mean that this has been supported
in regmap framework?
I searched but didn't find related mail about this, could you please
kindly point out the mail loop?
thanks very much;

> be honest I'd expect the interrupt core to hold a wakelock itself during
> interrupt processing.  If we're doing it in regmap then allowing the
> caller to set a wakelock to hold seems better than making them all write
> the code to take and release it.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()?
  2014-01-16 11:33   ` Yi Zhang
@ 2014-01-16 14:01     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-01-16 14:01 UTC (permalink / raw)
  To: Yi Zhang; +Cc: Yi Zhang, hongfeng, linux-kernel, zhouqiao

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

On Thu, Jan 16, 2014 at 07:33:13PM +0800, Yi Zhang wrote:
> 2014/1/15 Mark Brown <broonie@kernel.org>:
> > On Sat, Jan 11, 2014 at 12:15:21PM +0800, Yi Zhang wrote:

> >> I met a scenario:
> >> As soon as the interrupt is triggered, a wakelock is needed to be held
> >> until the threaded handler finishes,
> >> I think we may hold it in the primary interrupt handler, but now it's
> >> NULL by default;

> > This sounds like something we should just support in the core, though to

> Sorry, I'm not clear about this, you mean that this has been supported
> in regmap framework?
> I searched but didn't find related mail about this, could you please
> kindly point out the mail loop?
> thanks very much;

I'm saying we should support it in the core rather than providing a way
to override the handlers - it seems like it'll be sufficiently common
that we'll rapidly end up with multiple implementations anyway.  It
isn't currently supported in the core though, someone would need to
write that code.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-16 14:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-11  4:15 [Question] Should we make the primary interrupt handler configurable for regmap_add_irq_chip()? Yi Zhang
2014-01-14 21:06 ` Mark Brown
2014-01-16 11:33   ` Yi Zhang
2014-01-16 14:01     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.