linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Dmitry Torokhov <dtor_core@ameritech.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>,
	akpm@osdl.org, petero2@telia.com, Andries.Brouwer@cwi.nl,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/8] Add BTN_TOUCH to Synaptics driver. Update mousedev.
Date: Fri, 26 Sep 2003 00:30:32 +0200	[thread overview]
Message-ID: <20030925223032.GA32130@ucw.cz> (raw)
In-Reply-To: <200309251323.33416.dtor_core@ameritech.net>

On Thu, Sep 25, 2003 at 01:23:33PM -0500, Dmitry Torokhov wrote:
> On Thursday 25 September 2003 11:50 am, Vojtech Pavlik wrote:
> > +
> > +	if (hw.z > 30) input_report_key(dev, BTN_TOUCH, 1);
> > +	if (hw.z < 25) input_report_key(dev, BTN_TOUCH, 0);
> >
> 
> Couple of questions:
> 
> - Why does it use hard-coded values? Different people prefer different 
>   settings.

I just moved them from mousedev.c. 

> - Are userspace drivers supposed to use BTN_TOUCH event to detect whether 
>   the pad is touched or ABS_PRESSURE? If ABS_PRESSURE then BTN_TOUCH is
>   unneeded; otherwise it's not configurable.

A simple userspace program or kernel handler can use BTN_TOUCH, and
it'll trade off configurability for simplicity. BTN_TOUCH will most
likely be present on all touchpads, touchscreens and tablets, too, so it
can be relied on as a generic feature. An advanced one can be
configurable to use ABS_PRESSURE with user defined thresholds.

Another of the reasons is that ABS_PRESSURE is hardware-dependent.
Different device types will need very different thresholds. With the
driver providing the thresholded value, a generic handler (like
mousedev) can work without external configuration.

> - Introducing BTN_TOUCH as far as I can seen does nothing to prevent joydev
>   grabbing either Synaptics or touchscreens... Is there a patch missing?

No. It's a statement you're missing near the beginning of
joydev_connect().

>   Anyway, I still thing that joydev claims are too broad. Next time you add 
>   a non-joystick device you will need to re-examine joydev and it should be
>   other way around - if you add a joystick you need to make sure that joydev
>   grabs it. This way you will catch most problems right away.

It is possible. Maybe it's time now to define what event types each type
of device is supposed to have so that problems like this don't appear.

> BTW, any chance on including pass-through patches? Do you want me to re-diff 
> them?

Hmm, I thought I've merged them in already, but obviously I did not.
Please resend them (rediffed if possible). Thanks.

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2003-09-25 22:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-25 16:48 My current patches Vojtech Pavlik
2003-09-25 16:50 ` [PATCH 1/8] Revert synaptics->pktcnt change Vojtech Pavlik
2003-09-25 16:50   ` [PATCH 2/8] Fix multibutton handling in synaptics.c Vojtech Pavlik
2003-09-25 16:50     ` [PATCH 3/8] Synaptics code cleanups Vojtech Pavlik
2003-09-25 16:50       ` [PATCH 4/8] Add touchpad support to mousedev.c Vojtech Pavlik
2003-09-25 16:50         ` [PATCH 5/8] Rely less on sanity of AT keyboards Vojtech Pavlik
2003-09-25 16:50           ` [PATCH 6/8] Extend KD?BENT to handle > 256 keycodes Vojtech Pavlik
2003-09-25 16:50             ` [PATCH 7/8] Fix handling of rotated Synaptics touchpads Vojtech Pavlik
2003-09-25 16:50               ` [PATCH 8/8] Add BTN_TOUCH to Synaptics driver. Update mousedev Vojtech Pavlik
2003-09-25 18:23                 ` Dmitry Torokhov
2003-09-25 22:30                   ` Vojtech Pavlik [this message]
2003-09-26  5:24                     ` Peter Osterlund
2003-09-26  7:24                     ` Dmitry Torokhov
2003-09-26  7:54                       ` Vojtech Pavlik
2003-09-27  1:58                         ` Dmitry Torokhov
2003-09-27 20:19                         ` Pavel Machek
2003-09-27 21:05                           ` Vojtech Pavlik
2003-09-27 21:09                             ` Pavel Machek
2003-09-27 21:16                               ` Vojtech Pavlik
2003-09-27 21:18                                 ` Pavel Machek
2003-09-27 21:21                                   ` Vojtech Pavlik
2003-09-27 21:58                                     ` Matt Gibson
2003-09-28  9:49                                       ` Vojtech Pavlik
2003-09-25 22:57             ` [PATCH 6/8] Extend KD?BENT to handle > 256 keycodes Andrew Morton
2003-09-25 23:21               ` Vojtech Pavlik
2003-09-25 23:38             ` Andries Brouwer
2003-09-26  6:20               ` Vojtech Pavlik
2003-10-05 15:12           ` [PATCH 5/8] Rely less on sanity of AT keyboards Martin Josefsson
2003-09-25 18:13 ` My current patches Peter Osterlund

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=20030925223032.GA32130@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petero2@telia.com \
    /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).