PATCH/RFC [0/3]: Fix suspend and other acceleromter issues

Werner Almesberger werner at
Sun Nov 16 15:00:16 CET 2008

Simon Kagstrom wrote:
> (Email overload!)

Busy morning indeed ;-)

> This is already done in the interrupt handler for the data registers. The
> filter reset is "far" away from the data registers, so that one is read
> separately.

With DMA, retrieving some unused registers should be cheap. The
amount of data is trivial anyway, and SPI+DMA can then run in
parallel to the CPU.

> The issue I see with this is that the interrupt would contine to be
> asserted until we have actually read the data values, and I don't see
> how to handle this in a good way without visiting the interrupt handler
> in a loop.

I guess looping back to the handler should be okay in this case.
This should be a rare race condition anyway. (At 10MHz, DMA should
be done reading the 20*8 = 160 bits of STATUS_REG (0x27) through
CLICK_SRC (0x39) in about 16us. A completion interrupt handler
might even consume more time than that.

> Anyway, perhaps a stupid question, but assuming we use some threshold
> configuration, is the accelerometer stuff really that much of a
> performance problem?

That's of course an excellent question :-)

- Werner

More information about the openmoko-kernel mailing list