lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  9 Sep 2011 16:07:47 +0800
From:	John Sung <penmount.touch@...il.com>
To:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	John Sung <penmount.touch@...il.com>
Subject: [PATCH 3/3] Input: penmount - add PenMount 6250 support

Add multi touch support for PenMount 6250 touch controller.

Signed-off-by: John Sung <penmount.touch@...il.com>
---
 drivers/input/touchscreen/penmount.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c
index e4f953e..68da847 100644
--- a/drivers/input/touchscreen/penmount.c
+++ b/drivers/input/touchscreen/penmount.c
@@ -37,6 +37,7 @@ MODULE_LICENSE("GPL");
 #define	PM_MAX_LENGTH	6
 #define	PM_MAX_MTSLOT	16
 #define	PM_3000_MTSLOT	2
+#define	PM_6250_MTSLOT	12
 
 /*
  * Multi-touch slot
@@ -149,6 +150,20 @@ static irqreturn_t pm_interrupt(struct serio *serio,
 			}
 		}
 		break;
+	case 0x6250:
+		if ((pm->data[0] & 0xb0) == 0x30) {
+			if (pm->packetsize == ++pm->idx) {
+				if (pm_checkpacket(pm->data)) {
+					int slotnum = pm->data[0] & 0x0f;
+					pm->slots[slotnum].state = !!(pm->data[0] & 0x40);
+					pm->slots[slotnum].x = pm->data[2] * 256 + pm->data[1];
+					pm->slots[slotnum].y = pm->data[4] * 256 + pm->data[3];
+					pm_mtevent(pm, dev);
+				}
+				pm->idx = 0;
+			}
+		}
+		break;
 	}
 
 	return IRQ_HANDLED;
@@ -227,6 +242,14 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv)
 		input_set_abs_params(pm->dev, ABS_MT_POSITION_X, 0, 0x7ff, 0, 0);
 		input_set_abs_params(pm->dev, ABS_MT_POSITION_Y, 0, 0x7ff, 0, 0);
 		break;
+	case 3:
+		pm->packetsize = 6;
+		input_dev->id.product = 0x6250;
+		pm->maxcontacts = PM_6250_MTSLOT;
+		input_mt_init_slots(pm->dev, PM_6250_MTSLOT);
+		input_set_abs_params(pm->dev, ABS_MT_POSITION_X, 0, 0x3ff, 0, 0);
+		input_set_abs_params(pm->dev, ABS_MT_POSITION_Y, 0, 0x3ff, 0, 0);
+		break;
 	}
 
 	serio_set_drvdata(serio, pm);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ