Re: [PATCH] input: add support for PowerOn(PonKey) button on the AB8500 MFD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 02, 2010 at 12:25:37PM +0530, Rabin Vincent wrote:
> On Wed, Sep 01, 2010 at 18:51:42 +0200, Dmitry Torokhov wrote:
> > On Wed, Sep 01, 2010 at 01:05:51PM +0530, Sundar Iyer wrote:
> > > +	ret = request_threaded_irq(info->irq_dbr, NULL, ab8500_ponkey_handler,
> > > +					0, "ab8500-ponkey-dbr", info);
> > > +	if (ret < 0) {
> > > +		dev_err(ab8500->dev, "Failed to request dbr IRQ#%d: %d\n",
> > > +				info->irq_dbr, ret);
> > > +		goto out_irq_dbf;
> > > +	}
> > > +
> > 
> > Why threaded IRQs? The interrupt handlers do not do _anything_ except for
> > passing the event up. Do you really think that starting 2 kernel threads
> > to handle 1 button is the best use of the resources???
> 
> Because the parent MFD uses nested threads for handling interrupts, you
> must specify a thread function.  No new thread is started; this
> interrupt handler is called from the parent MFD's interrupt thread.
> 

I see.

> > 
> > I'll change it to use normal interrupts locally, no need to resubmit.
> 
> Changing it to request_irq() will cause it to fail, because __setup_irq
> will error out if this is a nested thread interrupt and no interrupt
> thread is specified.  request_any_context_irq() should work, if you
> would like to get rid of explicitly asking for a threaded irq.
> 

OK, request_any_context_irq() it is then.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux