Messages in this thread | | | From | Dmitry Torokhov <> | Subject | Re: [PATCH] adding the ICS MK712 touchscreen driver to 2.6 | Date | Sat, 5 Feb 2005 18:00:33 -0500 |
| |
On Saturday 05 February 2005 16:02, Vojtech Pavlik wrote: v> On Wed, Jan 19, 2005 at 04:18:49PM -0500, Richard Koch wrote: > > Please include the patch below to bring the ICS MK712 touchscreen controller > > support, which is in kernel 2.4, in to kernel 2.6. > > > > This patch was constructed and applied to kernel version 2.6.10 and tested > > successfully on several Gateway AOL Connected Touchpad computers. > > > > This was based on the mk712.c 2.4.28 version. No functional changes applied > > only minor > > changes to conform to the 2.6 build structure. I choose to place the driver > > under > > input/touchscreen as this seemed most appropriate. > > > > By making a contribution to this project, I certify that: > > > > The contribution is based upon previous work that, to the best > > of my knowledge, is covered under an appropriate open source > > license and I have the right under that license to submit that > > work with modifications, whether created in whole or in part > > by me, under the same open source license (unless I am > > permitted to submit under a different license), as indicated > > in the file. > > > > Signed-off-by: Rick Koch <n1gp@hotmail.com> > > > > patch also available at: http://home.comcast.net/~n1gp/mk712_2.6_patch > > I converted it to a proper input driver for you. ;) Can you check it if > it still works? > > +static irqreturn_t mk712_interrupt(int irq, void *dev_id, struct pt_regs *regs) > +{ > + unsigned char status; > + static int debounce = 1; > + static unsigned short last_x; > + static unsigned short last_y; > + > + input_regs(&mk712_dev, regs); > + > + status = inb(mk712_io + MK712_STATUS); > + > + if (~status & MK712_CONVERSION_COMPLETE) { > + debounce = 1; > + goto end; > + } > + > + if (~status & MK712_STATUS_TOUCH) > + { > + debounce = 1; > + input_report_key(&mk712_dev, BTN_TOUCH, 0); > + goto end; > + } > + > + if (debounce) > + { > + debounce = 0; > + goto end; > + } > + > + input_report_key(&mk712_dev, BTN_TOUCH, 1); > + input_report_abs(&mk712_dev, ABS_X, last_x); > + input_report_abs(&mk712_dev, ABS_Y, last_y);
Severe TAB vs. space damage...
> +static int mk712_open(struct input_dev *dev) > +{ > + > + if (mk712_used++) > + return 0; > + > + outb(0, mk712_io + MK712_CONTROL); /* Reset */ > +
We really should stop ignoring races and locking issues. Atomic perhaps?
-- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |