aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/mtouch.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-05 19:32:01 -0400
commit44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch)
tree93824f573767da634fbc82c388b6d33cc454212b /drivers/input/touchscreen/mtouch.c
parentc1a26e7d40fb814716950122353a1a556844286b (diff)
parent7d12e780e003f93433d49ce78cfedf4b4c52adc5 (diff)
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6: IRQ: Maintain regs pointer globally rather than passing to IRQ handlers IRQ: Typedef the IRQ handler function type IRQ: Typedef the IRQ flow handler function type
Diffstat (limited to 'drivers/input/touchscreen/mtouch.c')
-rw-r--r--drivers/input/touchscreen/mtouch.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/input/touchscreen/mtouch.c b/drivers/input/touchscreen/mtouch.c
index 8647a905df80..3b4c61664b63 100644
--- a/drivers/input/touchscreen/mtouch.c
+++ b/drivers/input/touchscreen/mtouch.c
@@ -63,12 +63,11 @@ struct mtouch {
63 char phys[32]; 63 char phys[32];
64}; 64};
65 65
66static void mtouch_process_format_tablet(struct mtouch *mtouch, struct pt_regs *regs) 66static void mtouch_process_format_tablet(struct mtouch *mtouch)
67{ 67{
68 struct input_dev *dev = mtouch->dev; 68 struct input_dev *dev = mtouch->dev;
69 69
70 if (MTOUCH_FORMAT_TABLET_LENGTH == ++mtouch->idx) { 70 if (MTOUCH_FORMAT_TABLET_LENGTH == ++mtouch->idx) {
71 input_regs(dev, regs);
72 input_report_abs(dev, ABS_X, MTOUCH_GET_XC(mtouch->data)); 71 input_report_abs(dev, ABS_X, MTOUCH_GET_XC(mtouch->data));
73 input_report_abs(dev, ABS_Y, MTOUCH_MAX_YC - MTOUCH_GET_YC(mtouch->data)); 72 input_report_abs(dev, ABS_Y, MTOUCH_MAX_YC - MTOUCH_GET_YC(mtouch->data));
74 input_report_key(dev, BTN_TOUCH, MTOUCH_GET_TOUCHED(mtouch->data)); 73 input_report_key(dev, BTN_TOUCH, MTOUCH_GET_TOUCHED(mtouch->data));
@@ -78,7 +77,7 @@ static void mtouch_process_format_tablet(struct mtouch *mtouch, struct pt_regs *
78 } 77 }
79} 78}
80 79
81static void mtouch_process_response(struct mtouch *mtouch, struct pt_regs *regs) 80static void mtouch_process_response(struct mtouch *mtouch)
82{ 81{
83 if (MTOUCH_RESPONSE_END_BYTE == mtouch->data[mtouch->idx++]) { 82 if (MTOUCH_RESPONSE_END_BYTE == mtouch->data[mtouch->idx++]) {
84 /* FIXME - process response */ 83 /* FIXME - process response */
@@ -90,16 +89,16 @@ static void mtouch_process_response(struct mtouch *mtouch, struct pt_regs *regs)
90} 89}
91 90
92static irqreturn_t mtouch_interrupt(struct serio *serio, 91static irqreturn_t mtouch_interrupt(struct serio *serio,
93 unsigned char data, unsigned int flags, struct pt_regs *regs) 92 unsigned char data, unsigned int flags)
94{ 93{
95 struct mtouch* mtouch = serio_get_drvdata(serio); 94 struct mtouch* mtouch = serio_get_drvdata(serio);
96 95
97 mtouch->data[mtouch->idx] = data; 96 mtouch->data[mtouch->idx] = data;
98 97
99 if (MTOUCH_FORMAT_TABLET_STATUS_BIT & mtouch->data[0]) 98 if (MTOUCH_FORMAT_TABLET_STATUS_BIT & mtouch->data[0])
100 mtouch_process_format_tablet(mtouch, regs); 99 mtouch_process_format_tablet(mtouch);
101 else if (MTOUCH_RESPONSE_BEGIN_BYTE == mtouch->data[0]) 100 else if (MTOUCH_RESPONSE_BEGIN_BYTE == mtouch->data[0])
102 mtouch_process_response(mtouch, regs); 101 mtouch_process_response(mtouch);
103 else 102 else
104 printk(KERN_DEBUG "mtouch.c: unknown/unsynchronized data from device, byte %x\n",mtouch->data[0]); 103 printk(KERN_DEBUG "mtouch.c: unknown/unsynchronized data from device, byte %x\n",mtouch->data[0]);
105 104