aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@gmail.com>2008-11-19 17:10:51 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:10:51 +0000
commitba3c1cc04bc71cb061fdbb5ae21669b99bd489c6 (patch)
tree0e682ba4aa93a04c515820e4433bdc30e60a4d77 /arch
parent685b99ad165ddb7eaa64962e66342f6bb1d48b30 (diff)
interface for configuring freefall/wakeup interrupts for the accelerometers
Hi! First: Unfortunately, the freerunner currently wakes up immediately on suspend when the accelerometer IRQ is selected as a wakeup source. I'm posting this for comments and if someone else wants to have a look at this problem. The patch should be safe to apply even though the sleep portion doesn't work - as long as it's configured it will not disturb anything. // Simon -- lis302dl-configure-wakeup-interrupts.patch From: simon.kagstrom <simon.kagstrom@gmail.com> First: Unfortunately, the freerunner currently wakes up immediately on suspend when the accelerometer IRQ is selected as a wakeup source. Add configuration of wakeup/freefall interrupts through a sysfs interface. Configuration is done through echoing a value of the form X Y Z THRESHOLD DURATION SPEC to freefall_wakeup_1/2. X, Y and Z are threshold values, given as a value > 0, < 0 or 0 to specify if an interrupt should be generated for high or low thresholds or neither (off). THRESHOLD specifies the threshold that must be exceeded. DURATION specifies the time in milliseconds for which the acceleration should be measured. SPEC is either '1' or '0' and specifies if the thresholds should be taken all together or one at a time ('and' or 'or' mode). Echoing '0' to the file turns off the interrupts. Example: echo "1 1 1 60 60 0" > freefall_wakeup_1 # Turn on x,y,z, 60ms/60 threshold, or-mode echo "0" > freefall_wakeup_1 # Turn off interrupt The hardware supports two simulataneous wakeup sources to be configured, but the freerunner only connects one of the interrupt outputs. The patch exports both. Similarly, only the "top" accelerometer can be used as a wake-up source, and it's not possible to generate DATA_READY interrupts while the wakeup interrupts are active. Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions