[PATCH] (repost) lis302dl-queue-work-in-interrupt-handler.patch

Andy Green andy at openmoko.com
Mon Sep 22 18:33:32 CEST 2008

Hash: SHA1

Somebody in the thread at some point said:
| Use work queue for lis302dl interrupts, fix accelerometer hang.

Yes I didn't miss it the first time, I have a little queue of patches at
the moment.

| From: Simon Kagstrom <simon.kagstrom at gmail.com>
| Use work queue for interrupts (since bitbang cannot be used in the
| interrupt handler). This gets rid of the special bitbang_read in

This isn't right, bitbang can and is used in the interrupt handler.
What can't be used there is Linux SPI functions.

| mach-gta02.c as well, so that function has been removed.
| The accelerometer "hang" seems to be caused by missed interrupts, so the
| interrupt handler now reads the x,y,z values until the status shows no
| outstanding data.

This does not solve the issue as described, if we miss an interrupt
after the work queue has serviced it stays missed.

I don't think the workqueue way is ideal either, that is what was in
there originally as the workaround for not being able to use SPI in
interrupt context, but it doubles the number of context switches per
interrupt, and we already have a lot of them.

Sean McNeil has a big patch against 2.6.26 which he says solve the same
issues, I plan to chop it up a bit and study what he has done about it.

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the openmoko-kernel mailing list