diff options
author | Samu Onkalo <samu.p.onkalo@nokia.com> | 2010-05-24 17:33:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-25 11:07:07 -0400 |
commit | 6d94d4081048756df78444a07201156f4930fe48 (patch) | |
tree | 7bfecedff2b04284ab45764d0ce6ec183a6594b3 /include/linux/lis3lv02d.h | |
parent | 92ba4fe4b53b4fa5ac71ec4d80572348fca85796 (diff) |
lis3: interrupt handlers for 8bit wakeup and click events
Content for the 8bit device threaded interrupt handlers. Depending on the
interrupt line and chip configuration, either click or wakeup / freefall
handler is called. In case of click, BTN_ event is sent via input device.
In case of wakeup or freefall, input device ABS_ events are updated
immediatelly.
It is still possible to configure interrupt line 1 for fast freefall
detection and use the second line either for click or threshold based
interrupts. Or both lines can be used for click / threshold interrupts.
Polled input device can be set to stopped state and still get coordinate
updates via input device using interrupt based method. Polled mode and
interrupt mode can also be used parallel.
BTN_ events are remapped based on existing axis remapping information.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Acked-by: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/lis3lv02d.h')
-rw-r--r-- | include/linux/lis3lv02d.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h index fd289b1e1ec1..0e8a346424bb 100644 --- a/include/linux/lis3lv02d.h +++ b/include/linux/lis3lv02d.h | |||
@@ -25,12 +25,14 @@ struct lis3lv02d_platform_data { | |||
25 | #define LIS3_IRQ1_FF_WU_12 (3 << 0) | 25 | #define LIS3_IRQ1_FF_WU_12 (3 << 0) |
26 | #define LIS3_IRQ1_DATA_READY (4 << 0) | 26 | #define LIS3_IRQ1_DATA_READY (4 << 0) |
27 | #define LIS3_IRQ1_CLICK (7 << 0) | 27 | #define LIS3_IRQ1_CLICK (7 << 0) |
28 | #define LIS3_IRQ1_MASK (7 << 0) | ||
28 | #define LIS3_IRQ2_DISABLE (0 << 3) | 29 | #define LIS3_IRQ2_DISABLE (0 << 3) |
29 | #define LIS3_IRQ2_FF_WU_1 (1 << 3) | 30 | #define LIS3_IRQ2_FF_WU_1 (1 << 3) |
30 | #define LIS3_IRQ2_FF_WU_2 (2 << 3) | 31 | #define LIS3_IRQ2_FF_WU_2 (2 << 3) |
31 | #define LIS3_IRQ2_FF_WU_12 (3 << 3) | 32 | #define LIS3_IRQ2_FF_WU_12 (3 << 3) |
32 | #define LIS3_IRQ2_DATA_READY (4 << 3) | 33 | #define LIS3_IRQ2_DATA_READY (4 << 3) |
33 | #define LIS3_IRQ2_CLICK (7 << 3) | 34 | #define LIS3_IRQ2_CLICK (7 << 3) |
35 | #define LIS3_IRQ2_MASK (7 << 3) | ||
34 | #define LIS3_IRQ_OPEN_DRAIN (1 << 6) | 36 | #define LIS3_IRQ_OPEN_DRAIN (1 << 6) |
35 | #define LIS3_IRQ_ACTIVE_LOW (1 << 7) | 37 | #define LIS3_IRQ_ACTIVE_LOW (1 << 7) |
36 | unsigned char irq_cfg; | 38 | unsigned char irq_cfg; |