aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorJohn Sung <penmount.touch@gmail.com>2011-09-09 16:33:12 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-09-21 01:46:30 -0400
commitbd8f6d2ed416d6c70fc3d4f98b165a56e025331c (patch)
tree3ee326d0fab541b53f1e89dba891dbc160929c9d /drivers/input
parent90aba7d8b155c2c39e269608e4a446190e3cd704 (diff)
Input: penmount - add PenMount 6250 support
Add multi touch support for PenMount 6250 touch controller. Signed-off-by: John Sung <penmount.touch@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/penmount.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c
index 71422b91dc46..a047850e38b1 100644
--- a/drivers/input/touchscreen/penmount.c
+++ b/drivers/input/touchscreen/penmount.c
@@ -37,6 +37,7 @@ MODULE_LICENSE("GPL");
37#define PM_MAX_LENGTH 6 37#define PM_MAX_LENGTH 6
38#define PM_MAX_MTSLOT 16 38#define PM_MAX_MTSLOT 16
39#define PM_3000_MTSLOT 2 39#define PM_3000_MTSLOT 2
40#define PM_6250_MTSLOT 12
40 41
41/* 42/*
42 * Multi-touch slot 43 * Multi-touch slot
@@ -150,6 +151,21 @@ static irqreturn_t pm_interrupt(struct serio *serio,
150 } 151 }
151 } 152 }
152 break; 153 break;
154
155 case 0x6250:
156 if ((pm->data[0] & 0xb0) == 0x30) {
157 if (pm->packetsize == ++pm->idx) {
158 if (pm_checkpacket(pm->data)) {
159 int slotnum = pm->data[0] & 0x0f;
160 pm->slots[slotnum].active = pm->data[0] & 0x40;
161 pm->slots[slotnum].x = pm->data[2] * 256 + pm->data[1];
162 pm->slots[slotnum].y = pm->data[4] * 256 + pm->data[3];
163 pm_mtevent(pm, dev);
164 }
165 pm->idx = 0;
166 }
167 }
168 break;
153 } 169 }
154 170
155 return IRQ_HANDLED; 171 return IRQ_HANDLED;
@@ -227,6 +243,13 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv)
227 max_x = max_y = 0x7ff; 243 max_x = max_y = 0x7ff;
228 pm->maxcontacts = PM_3000_MTSLOT; 244 pm->maxcontacts = PM_3000_MTSLOT;
229 break; 245 break;
246
247 case 3:
248 pm->packetsize = 6;
249 input_dev->id.product = 0x6250;
250 max_x = max_y = 0x3ff;
251 pm->maxcontacts = PM_6250_MTSLOT;
252 break;
230 } 253 }
231 254
232 input_set_abs_params(pm->dev, ABS_X, 0, max_x, 0, 0); 255 input_set_abs_params(pm->dev, ABS_X, 0, max_x, 0, 0);