aboutsummaryrefslogtreecommitdiff
path: root/mm/pdflush.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2009-03-09 21:01:01 +0000
committerAndy Green <agreen@octopus.localdomain>2009-03-09 21:01:01 +0000
commitb2ae84d8bd469fe81fa0a967fde9008416a78365 (patch)
treef8129c6d198ea78c2c960f2eff299bb7d2216623 /mm/pdflush.c
parent514314f19b8d89797cf0a9e235f6123f4ef87f62 (diff)
(AG: there's some more rationale for changing this here
http://lists.openmoko.org/pipermail/openmoko-kernel/2009-March/009387.html ) Change accelerometers to use ABS events rather than REL events. [Obviously if this patch is accepted we need to tell developers about it. I have a number of other improvements to the accelerometers I hope to deliver over the next couple of weeks. They will have minimal or zero disruption to current code. ] REL events should be used when there is no absolute reference, and only changes are meaningful. The classic example is a "mouse" where the absolute position of the device is not measurable and not particularly meaning, but change in position from one time to the next is interesting. With REL events, a value of '0' is not reported, as 'not change' is not interesting. With REL events, the expectation is that successive values will be eventually summed (possibly with acceleration and clipping adjustments) to get a usable value. ABS events should be used when there is an absolute references against which things that be measured. With ABS events, the 'current value' is meaningful and can be read (EVIOCGABS). With ABS events, the value '0' is very meaningful and is reported. However if consecutive values are the same, the value is only reported once. ABS events can be used as-is or compared with previous events to get some measure of change. An obvious example is a touchscreen where each measure in independently meaningful. Acceleration is an absolute value as it is measuring against a frame of reference. '0' acceleration is just as meaningful as any other value, and finding the 'current' acceleration is each direction is a potentially useful thing to do. The Freerunner accelerometers currently report REL events. This is wrong. So this patch changes them to report ABS events. With this patch, the min/max/level/fuzz values are left at zero. It might be useful to make use of these in a subsequent patch. min/max/level can be used to calibrate the accelerometers if accuracy is important. fuzz could possibly be used in conjunction with the 'threshold' sysfs value to get less frequent, lower-precision reports. This may well break some applications that read accelerometer data. This cannot be helped, but it is quite easy to write code that copes with the incorrect EV_REL events as well as the more correct and useful EV_ABS events. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mm/pdflush.c')
0 files changed, 0 insertions, 0 deletions