Threshold for accelerometer data

Simon Kagstrom simon.kagstrom at
Fri Oct 10 18:08:21 CEST 2008


I saw some mails on the community list (which I don't subscribe to)
discussing setting a threshold for accelerometer [1] data. I just
wanted to say that I wrote a patch just recently that does this (and
from some quick tests seem to work).

The "problem" is that it's based on my earlier patch which used a
workqueue for the interrupt handling. It was a lot easier to start
hacking on it that way since it allows just reinserting the module
instead of rebooting the freerunner if you change mach-gta02.c with the
current approach. The modification needed is basically to read the
HP_FILTER_RESET register on interrupts to reset the base from which the
acceleration should be measured.

Incidently, I also found the debug patch I posted earlier very helpful
when trying this out - with that I could "implement" and test the
functionality in a shell script before changing the C code. :-)

// Simon
[1] Hey, I'm starting to learn to spell that correct (I think!)

More information about the openmoko-kernel mailing list