提交 bd8f6d2e 编写于 作者: J John Sung 提交者: Dmitry Torokhov

Input: penmount - add PenMount 6250 support

Add multi touch support for PenMount 6250 touch controller.
Signed-off-by: NJohn Sung <penmount.touch@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 90aba7d8
...@@ -37,6 +37,7 @@ MODULE_LICENSE("GPL"); ...@@ -37,6 +37,7 @@ MODULE_LICENSE("GPL");
#define PM_MAX_LENGTH 6 #define PM_MAX_LENGTH 6
#define PM_MAX_MTSLOT 16 #define PM_MAX_MTSLOT 16
#define PM_3000_MTSLOT 2 #define PM_3000_MTSLOT 2
#define PM_6250_MTSLOT 12
/* /*
* Multi-touch slot * Multi-touch slot
...@@ -150,6 +151,21 @@ static irqreturn_t pm_interrupt(struct serio *serio, ...@@ -150,6 +151,21 @@ static irqreturn_t pm_interrupt(struct serio *serio,
} }
} }
break; 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].active = 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; return IRQ_HANDLED;
...@@ -227,6 +243,13 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv) ...@@ -227,6 +243,13 @@ static int pm_connect(struct serio *serio, struct serio_driver *drv)
max_x = max_y = 0x7ff; max_x = max_y = 0x7ff;
pm->maxcontacts = PM_3000_MTSLOT; pm->maxcontacts = PM_3000_MTSLOT;
break; break;
case 3:
pm->packetsize = 6;
input_dev->id.product = 0x6250;
max_x = max_y = 0x3ff;
pm->maxcontacts = PM_6250_MTSLOT;
break;
} }
input_set_abs_params(pm->dev, ABS_X, 0, max_x, 0, 0); input_set_abs_params(pm->dev, ABS_X, 0, max_x, 0, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册