Jonathan neglected to mention that he's already sent a driver
for this to the SPI list. ;)
Which is part of the reason for asking this question. Right
now that driver sits in drivers/spi/lis3l02dq.c but that is
probably not its best long-term domicile.
I guess I don't follow. The SPI framework handles all that
stuff already, even if you're bitbanging. Though to be
sure, if you're bitbanging SPI you want your platform to
be able to inline those GPIO calls so those inner loops
only take a few instructions per bit ... also solved! :)
True. I imagine a few other such issues will appear once
more folk than Jonathan are using these sorts of sensors
on Linux. I'd expect the sample stream to have internal
timestamps for truly critical systems, unless variability
in when the host makes timestamps is not really an issue.
Midpoint? That's not one I've come across before. All four
standard SPI clock/sample/shift modes are already supported
in the SPI framework though. Ditto active-high chipselects
(vs normal active-low) etc.
- Dave
--