Using spi_async for the accelerometer interrupt data retrieval
andy at openmoko.com
Fri Oct 10 11:56:42 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Simon Kagstrom wrote:
> I did a test implementation of the lis302dl interrupt handler using the
> spi_async scheme. It doesn't quite work, but I'm sure I've just done
> some slight mistake in some place. But I'm still pessimistic about
> this work.
> I took a peek at the implementation, and what spi_async() really boils
> down to is a call to spi_bitbang_transfer(), which is in
> drivers/spi/spi_bitbang.c. This in turn simply uses a workqueue to
> schedule the operations for later. All reg_reads are done this way via
> spi_sync, so while the spi_async method should be more efficient than
> using a plain workqueue, it still uses the same principle.
> The race condition is still there as it depends on the workqueue.
> I'll see if I can get a working version as well :-)
Great, thanks for spending the time examining this.
On andy-tracking here I have ported the bitbang-all-the-way patch at the
moment because the Linux SPI API stuff is incompatible with using
interrupt lockout to manage the shared bus access between the two
accels. But, obviously upstream folks will look at this implementation
a bit funny, so it would be good if you can find a way that is efficient
using the APIs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the openmoko-kernel