-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Kagstrom wrote: > Howdy! > > 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. - -Andy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkjvJtoACgkQOjLpvpq7dMopjgCfV7H7KsQJ9JdzDBTgDweInKrY tjQAoJLWaWXsBCVSIlIOgjP5w2cf+Faf =QV9g -----END PGP SIGNATURE-----
