msleep() in interrupt handler?
Woody Wu
narkewoody at gmail.com
Thu Aug 20 07:02:50 EDT 2015
On Thursday, August 20, 2015, John de la Garza <john at jjdev.com> wrote:
> On Thu, Aug 20, 2015 at 01:45:34PM +0800, Woody Wu wrote:
> > I did not see the message. Actually my interrupt handler is calling
> > i2c_transfer which in turn used msleep() somewhere in its code. Is this
> > normal or dangerous?
>
> Can you have the interrupt handler put the work on a workqueue
> and quickly return?
>
Yes, that is an option. But I firstly need to know the old code is really
bad. The interrupt is triggered by an i2c touchscreen, and the interrupt
handler use the i2c core code to start the i2c transferring. I see in the
i2c adapter code a msleep() was invoked at beginning of transfer. I doubt
that this is a potential problem. But you know the i2c touchscreen driver
code is also part of the mainline, so I am not sure my option. You guys
can check the code of atmel_mXT224_ts.c, the i2c adapter code is i2c_s3c.c
Thanks in advance.
-woody
--
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150820/48bbdfa1/attachment.html
More information about the Kernelnewbies
mailing list