[OLPC trackpad] Recognise new v3 trackpad, use GS mode only for now
David Woodhouse
dwmw2 at infradead.unroutableorg
Tue Dec 5 07:22:45 EST 2006
Commit: b9e5120610df36b708e5574fb8ebd47063a7a82a
Parent: 56d0aae4c4966c17db99d7340c9962b27ca1bba4
commit b9e5120610df36b708e5574fb8ebd47063a7a82a
Author: David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Tue Dec 5 12:28:04 2006 +0000
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Dec 5 12:28:04 2006 +0000
[OLPC trackpad] Recognise new v3 trackpad, use GS mode only for now
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/input/mouse/olpc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c
index 9b2a56c..087dc64 100644
--- a/drivers/input/mouse/olpc.c
+++ b/drivers/input/mouse/olpc.c
@@ -43,8 +43,9 @@ static int tpdebug;
module_param(tpdebug, int, 0644);
static const struct olpc_model_info olpc_model_data[] = {
- { { 0x67, 0x00, 0x0a }, 0 }, /* OLPC in PT+GS mode. */
- { { 0x67, 0x00, 0x14 }, 0 }, /* Newer OLPC in PT+GS mode. */
+ { { 0x67, 0x00, 0x0a }, 0 }, /* v1 in PT+GS mode. */
+ { { 0x67, 0x00, 0x14 }, 0 }, /* v2 in PT+GS mode. */
+ { { 0x67, 0x00, 0x28 }, 1 }, /* v3, single-mode. */
};
#define OLPC_PKT_SIM 0xeb
@@ -417,6 +418,10 @@ int olpc_init(struct psmouse *psmouse)
if (!(priv->i = olpc_get_model(psmouse)))
goto init_fail;
+ if (!tpmode && (priv->i->flags & 1)) {
+ /* Can't do dual-mode on newest device; use GS mode to start */
+ tpmode = 1;
+ }
if (olpc_absolute_mode(psmouse)) {
printk(KERN_ERR "olpc.c: Failed to enable absolute mode\n");
goto init_fail;
More information about the Commits-kernel
mailing list