[PATCH 0/5]: Accelerometer refactoring and features

Simon Kagstrom simon.kagstrom at gmail.com
Wed Oct 15 20:10:40 CEST 2008

Ho ho!

Santa claus is back with a bag full of fresh bugs! This is a series of
patches that refactor the accelerometer implementation a bit and adds
some missing features. The series does this:

* Refactors the source code a bit, moving "utility functions" to the
  top of the file and re-adding __reg_read/__reg_write wrappers.

* Changes the threshold configuration to be given in mg and at the same
  time honors the scale setting (and fix the sampling function to honor
  it as well).

* Adds a 'duration' sysfs file for those that want to configure this
  together with the threshold.

* If 0 is written to threshold, open the floodgates and generate data
  ready interrupts again.

* Refactor the wakeup configuration and "commit" it only when the
  device is suspended. Only one interrupt source is now allowed, which
  simplifies the source code quite a bit.

Discussion points:

* I've followed the convention of using __-prefixes in this file. I'm
  not very happy about it myself, but it seems to be used for other
  utility functions.

* Wakeups are like before: Configuring it to basically anything will
  wake up the device immediately on suspend. I'm hoping this will be
  fixed magically in 2.6.27

// Simon

More information about the openmoko-kernel mailing list