diff options
author | Daniel Kurtz <djkurtz@chromium.org> | 2013-03-07 22:43:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-08 19:03:29 -0500 |
commit | 22dfab7fd7fd5a8a2c5556ca0a8fd35fc959abc8 (patch) | |
tree | 009b5cdf5cba8e20266861989d38bc777ef845f7 /include | |
parent | 67a865a40b46d4e5d2afd154303b10220202140f (diff) |
Input: atmel_mxt_ts - Support for touchpad variant
This same driver can be used by atmel based touchscreens and touchpads
(buttonpads). Platform data may specify a device is a touchpad
using the is_tp flag.
This will cause the driver to perform some touchpad specific
initializations, such as:
* register input device name "Atmel maXTouch Touchpad" instead of
Touchscreen.
* register BTN_LEFT & BTN_TOOL_* event types.
* register axis resolution (as a fixed constant, for now)
* register BUTTONPAD property
* process GPIO buttons using reportid T19
Input event GPIO mapping is done by the platform data key_map array.
key_map[x] should contain the KEY or BTN code to send when processing
GPIOx from T19. To specify a GPIO as not an input source, populate
with KEY_RESERVED, or 0.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/atmel_mxt_ts.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/i2c/atmel_mxt_ts.h b/include/linux/i2c/atmel_mxt_ts.h index f027f7a63511..99e379b74398 100644 --- a/include/linux/i2c/atmel_mxt_ts.h +++ b/include/linux/i2c/atmel_mxt_ts.h | |||
@@ -15,6 +15,9 @@ | |||
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | /* For key_map array */ | ||
19 | #define MXT_NUM_GPIO 4 | ||
20 | |||
18 | /* Orient */ | 21 | /* Orient */ |
19 | #define MXT_NORMAL 0x0 | 22 | #define MXT_NORMAL 0x0 |
20 | #define MXT_DIAGONAL 0x1 | 23 | #define MXT_DIAGONAL 0x1 |
@@ -39,6 +42,8 @@ struct mxt_platform_data { | |||
39 | unsigned int voltage; | 42 | unsigned int voltage; |
40 | unsigned char orient; | 43 | unsigned char orient; |
41 | unsigned long irqflags; | 44 | unsigned long irqflags; |
45 | bool is_tp; | ||
46 | const unsigned int key_map[MXT_NUM_GPIO]; | ||
42 | }; | 47 | }; |
43 | 48 | ||
44 | #endif /* __LINUX_ATMEL_MXT_TS_H */ | 49 | #endif /* __LINUX_ATMEL_MXT_TS_H */ |