diff options
Diffstat (limited to 'drivers/input/mouse/sentelic.h')
-rw-r--r-- | drivers/input/mouse/sentelic.h | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/drivers/input/mouse/sentelic.h b/drivers/input/mouse/sentelic.h index 2e4af24f8c15..334de19e5ddb 100644 --- a/drivers/input/mouse/sentelic.h +++ b/drivers/input/mouse/sentelic.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Finger Sensing Pad PS/2 mouse driver. | 2 | * Finger Sensing Pad PS/2 mouse driver. |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. | 4 | * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. |
5 | * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. | 5 | * Copyright (C) 2005-2012 Tai-hwa Liang, Sentelic Corporation. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or | 7 | * This program is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License | 8 | * modify it under the terms of the GNU General Public License |
@@ -55,6 +55,16 @@ | |||
55 | #define FSP_BIT_FIX_HSCR BIT(5) | 55 | #define FSP_BIT_FIX_HSCR BIT(5) |
56 | #define FSP_BIT_DRAG_LOCK BIT(6) | 56 | #define FSP_BIT_DRAG_LOCK BIT(6) |
57 | 57 | ||
58 | #define FSP_REG_SWC1 (0x90) | ||
59 | #define FSP_BIT_SWC1_EN_ABS_1F BIT(0) | ||
60 | #define FSP_BIT_SWC1_EN_GID BIT(1) | ||
61 | #define FSP_BIT_SWC1_EN_ABS_2F BIT(2) | ||
62 | #define FSP_BIT_SWC1_EN_FUP_OUT BIT(3) | ||
63 | #define FSP_BIT_SWC1_EN_ABS_CON BIT(4) | ||
64 | #define FSP_BIT_SWC1_GST_GRP0 BIT(5) | ||
65 | #define FSP_BIT_SWC1_GST_GRP1 BIT(6) | ||
66 | #define FSP_BIT_SWC1_BX_COMPAT BIT(7) | ||
67 | |||
58 | /* Finger-sensing Pad packet formating related definitions */ | 68 | /* Finger-sensing Pad packet formating related definitions */ |
59 | 69 | ||
60 | /* absolute packet type */ | 70 | /* absolute packet type */ |
@@ -64,12 +74,32 @@ | |||
64 | #define FSP_PKT_TYPE_NORMAL_OPC (0x03) | 74 | #define FSP_PKT_TYPE_NORMAL_OPC (0x03) |
65 | #define FSP_PKT_TYPE_SHIFT (6) | 75 | #define FSP_PKT_TYPE_SHIFT (6) |
66 | 76 | ||
77 | /* bit definitions for the first byte of report packet */ | ||
78 | #define FSP_PB0_LBTN BIT(0) | ||
79 | #define FSP_PB0_RBTN BIT(1) | ||
80 | #define FSP_PB0_MBTN BIT(2) | ||
81 | #define FSP_PB0_MFMC_FGR2 FSP_PB0_MBTN | ||
82 | #define FSP_PB0_MUST_SET BIT(3) | ||
83 | #define FSP_PB0_PHY_BTN BIT(4) | ||
84 | #define FSP_PB0_MFMC BIT(5) | ||
85 | |||
86 | /* hardware revisions */ | ||
87 | #define FSP_VER_STL3888_A4 (0xC1) | ||
88 | #define FSP_VER_STL3888_B0 (0xD0) | ||
89 | #define FSP_VER_STL3888_B1 (0xD1) | ||
90 | #define FSP_VER_STL3888_B2 (0xD2) | ||
91 | #define FSP_VER_STL3888_C0 (0xE0) | ||
92 | #define FSP_VER_STL3888_C1 (0xE1) | ||
93 | #define FSP_VER_STL3888_D0 (0xE2) | ||
94 | #define FSP_VER_STL3888_D1 (0xE3) | ||
95 | #define FSP_VER_STL3888_E0 (0xE4) | ||
96 | |||
67 | #ifdef __KERNEL__ | 97 | #ifdef __KERNEL__ |
68 | 98 | ||
69 | struct fsp_data { | 99 | struct fsp_data { |
70 | unsigned char ver; /* hardware version */ | 100 | unsigned char ver; /* hardware version */ |
71 | unsigned char rev; /* hardware revison */ | 101 | unsigned char rev; /* hardware revison */ |
72 | unsigned char buttons; /* Number of buttons */ | 102 | unsigned int buttons; /* Number of buttons */ |
73 | unsigned int flags; | 103 | unsigned int flags; |
74 | #define FSPDRV_FLAG_EN_OPC (0x001) /* enable on-pad clicking */ | 104 | #define FSPDRV_FLAG_EN_OPC (0x001) /* enable on-pad clicking */ |
75 | 105 | ||
@@ -78,6 +108,7 @@ struct fsp_data { | |||
78 | 108 | ||
79 | unsigned char last_reg; /* Last register we requested read from */ | 109 | unsigned char last_reg; /* Last register we requested read from */ |
80 | unsigned char last_val; | 110 | unsigned char last_val; |
111 | unsigned int last_mt_fgr; /* Last seen finger(multitouch) */ | ||
81 | }; | 112 | }; |
82 | 113 | ||
83 | #ifdef CONFIG_MOUSE_PS2_SENTELIC | 114 | #ifdef CONFIG_MOUSE_PS2_SENTELIC |