From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-input@atrey.karlin.mff.cuni.cz
Cc: Vojtech Pavlik <vojtech@suse.de>, Richard Koch <n1gp@hotmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] adding the ICS MK712 touchscreen driver to 2.6
Date: Sat, 5 Feb 2005 18:00:33 -0500 [thread overview]
Message-ID: <200502051800.33621.dtor_core@ameritech.net> (raw)
In-Reply-To: <20050205210203.GX2711@ucw.cz>
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
next prev parent reply other threads:[~2005-02-05 23:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 21:18 [PATCH] adding the ICS MK712 touchscreen driver to 2.6 Richard Koch
2005-01-20 18:04 ` Dmitry Torokhov
2005-02-05 19:31 ` Vojtech Pavlik
2005-02-05 21:02 ` Vojtech Pavlik
2005-02-05 23:00 ` Dmitry Torokhov [this message]
2005-02-06 9:25 ` Vojtech Pavlik
2005-02-06 17:53 ` Dmitry Torokhov
-- strict thread matches above, loose matches on Subject: below --
2005-02-11 15:50 Richard Koch
2005-02-11 16:08 ` Vojtech Pavlik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502051800.33621.dtor_core@ameritech.net \
--to=dtor_core@ameritech.net \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=n1gp@hotmail.com \
--cc=vojtech@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox