From: mru@users.sourceforge.net (Måns Rullgård)
To: linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] "Disable Trackpad while typing" on Notebooks withh a PS/2 Trackpad
Date: 02 May 2003 00:13:53 +0200 [thread overview]
Message-ID: <yw1x4r4eqpr2.fsf@zaphod.guide> (raw)
In-Reply-To: 3EB19625.6040904@onlinehome.de
Hans-Georg Thien <1682-600@onlinehome.de> writes:
> static inline void handle_keyboard_event(unsigned char scancode)
> {
> +
> +#ifdef CONFIG_DISABLE_TRACKPAD_WHILE_TYPING
> +
> + /* setup a timer to re-enable the trackpad */
> + static struct timer_list enable_trackpad_timer;
> + static int enable_trackpad_timer_initialized=0;
> +
> + disable_trackpad_while_typing=1; /* disable trackpad */
> +
> + if(enable_trackpad_timer_initialized)
> + {
> + /* trackpad timer already exists, - just restart it */
> + mod_timer(&enable_trackpad_timer, jiffies+trackpad_delay);
> + }
> + else
> + {
> + /* no trackpad timer yet. Initialize and start it */
> + init_timer(&enable_trackpad_timer);
> + enable_trackpad_timer.expires=jiffies+trackpad_delay;
> + enable_trackpad_timer.function=enable_trackpad;
> + add_timer(&enable_trackpad_timer);
> + enable_trackpad_timer_initialized=1;
The else block would probably be better off in some initialization
function. Maybe the same place that sets up the interrupt handler is
appropriate.
--
Måns Rullgård
mru@users.sf.net
next prev parent reply other threads:[~2003-05-01 22:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-01 21:48 [RFC][PATCH] "Disable Trackpad while typing" on Notebooks withh a PS/2 Trackpad Hans-Georg Thien
2003-05-01 22:13 ` Måns Rullgård [this message]
2003-05-06 9:29 ` wwp
2003-05-06 11:27 ` Hans-Georg Thien
2003-05-08 19:12 ` [RFC][PATCH] "Disable Trackpad while typing" on Notebooks withh aPS/2 Trackpad Khalid Aziz
2003-05-09 11:47 ` Hans-Georg Thien
2003-05-27 20:47 ` Hans-Georg Thien
2003-05-27 21:10 ` wwp
2003-05-29 12:07 ` Hans-Georg Thien
2003-09-30 20:51 ` [PORT to 2.6.x] "Disable Trackpad while typing" on Notebooks with a PS/2 Trackpad Hans-Georg Thien
2003-10-02 17:40 ` getting timestamp of last interrupt? Hans-Georg Thien
2003-10-02 18:54 ` Karim Yaghmour
2003-10-02 18:59 ` Richard B. Johnson
2003-10-02 22:46 ` Peter Chubb
[not found] <3EB19625.6040904@onlinehome.de.suse.lists.linux.kernel>
2003-05-01 22:29 ` [RFC][PATCH] "Disable Trackpad while typing" on Notebooks withh a PS/2 Trackpad Andi Kleen
2003-05-05 22:48 ` Hans-Georg Thien
2003-05-06 9:04 ` Alex Riesen
[not found] ` <mailman.1052174881.22701.linux-kernel2news@redhat.com>
2003-05-06 3:24 ` Pete Zaitcev
2003-05-02 9:41 Hans-Georg Thien
[not found] <fa.pum5p2l.umu1r1@ifi.uio.no>
[not found] ` <fa.ianmvqa.8le6bo@ifi.uio.no>
2003-05-02 11:44 ` Hans-Georg Thien
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=yw1x4r4eqpr2.fsf@zaphod.guide \
--to=mru@users.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).