mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
67a865a40b
commit
22dfab7fd7
2 changed files with 67 additions and 2 deletions
|
@ -15,6 +15,9 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
/* For key_map array */
|
||||
#define MXT_NUM_GPIO 4
|
||||
|
||||
/* Orient */
|
||||
#define MXT_NORMAL 0x0
|
||||
#define MXT_DIAGONAL 0x1
|
||||
|
@ -39,6 +42,8 @@ struct mxt_platform_data {
|
|||
unsigned int voltage;
|
||||
unsigned char orient;
|
||||
unsigned long irqflags;
|
||||
bool is_tp;
|
||||
const unsigned int key_map[MXT_NUM_GPIO];
|
||||
};
|
||||
|
||||
#endif /* __LINUX_ATMEL_MXT_TS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue