linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>, Michael Welling <mwelling@ieee.org>,
	kernel list <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org, pali.rohar@gmail.com,
	sre@kernel.org, aaro.koskinen@iki.fi,
	ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com,
	serge@hallyn.com
Subject: Re: v4.1 to v4.7: regression in tsc2005 driver
Date: Thu, 21 Jul 2016 08:55:32 +1000	[thread overview]
Message-ID: <20160720225532.GA22515@jelly> (raw)
In-Reply-To: <20160720222002.GD26006@dtor-ws>

On Wed, Jul 20, 2016 at 03:20:02PM -0700, Dmitry Torokhov wrote:
> On Thu, Jul 21, 2016 at 07:47:36AM +1000, Peter Hutterer wrote:
> > On Wed, Jul 20, 2016 at 09:23:56AM -0700, Dmitry Torokhov wrote:
> > > On Wed, Jul 20, 2016 at 08:25:58AM +0200, Pavel Machek wrote:
> > > > Hi!
> > > > 
> > > > > > > > > > > drivers/input/touchscreen/tsc2005.c:	  input_dev->name = "TSC2005
> > > > > > > > > > > touchscreen";
> > > > > > > > > > > 
> > > > > > > > > > > to "TSC200X touchscreen". Unfortunately, X seems to propagate that
> > > > > > > > > > > name to userspace, where it is needed to be able to do
> > > > > 
> > > > > Technically X _is_ userspace.
> > > > 
> > > > There's "userspace running as root" and "userspace userspace" :-).
> > > 
> > > I do not really see any difference form the kernel POW. 
> > > 
> > > > 
> > > > > > > > > > > 
> > > > > > > > > > > xinput --set-prop --type=int ...
> > > > > > > > > > > 
> > > > > > > > > > > with the right arguments to calibrate touchscreen. (Touchscreen is
> > > > > > > > > > > unusable without calibration).
> > > > > > > > > > > 
> > > > > > > > > > > What to do with that?
> > > > > 
> > > > > Hmm, I do not think we ever committed for the device names to be stable.
> > > > > You are supposed to locate touchscreen device based on its properties
> > > > > and you might need some heuristic if you encounter a system with more
> > > > > than one such touchscreen.
> > > > 
> > > > Well, you are commited now, like it or not, X people did it for you
> > > > :-(.
> > > > 
> > > > Because there's no other reasonable way to use xinput --set-prop...
> > > 
> > > Well, X is going to have to fix it. How am I supposed to control my
> > > devices in multi-seat environment if I use the same hardware (or if I
> > > have device with multiple touchscreens)? They all will have the same
> > > name (well, all mice, then all keyboards, etc). Let's add Peter to the
> > > fold...
> > > 
> > > In the mean time you can adjust the name or use XID instead.
> > 
> > X has partially fixed this a few years ago. All input drivers (that
> > matter) export a Device Node property that sets the device node for each
> > device.
> > 
> >  $ xinput list-props "SynPS/2 Synaptics TouchPad" | grep "Device Node"
> >         Device Node (261):      "/dev/input/event4"
> > 
> > Based on that you can get the udev device and work your way into any of the
> > sysfs tree. Or do whatever else you want.
> 
> The issue is not that I can't figure out sysfs path for a device, the
> issue is that xinput does not accept anything but name or XID and I may
> have multiple devices with the same name in the system.

fwiw, the main reason why I don't want this in xinput is that anything
sysfs related (or elsewhere) is platform specific. On BSD the Device
Node isn't an evdev node and other efforts are required. xinput is an X tool
itself and I don't want non-X functionality in it because you'll quickly
unleash pandora's box here about stuffing custom features in that only apply
to a tiny fraction of setups.

even the case where you have more than one device with the same name is
quite unusal (note: we do support a "pointer:" and "keyboard:" prefix for
those where a device has a pointer and a keyboard device with the same
name like many of the mouse/keyboard combos do).

> > But other than that there isn't anything in X to fix. xinput is primarily a
> > debugging tool and it does name resolution for convenience. But it's not a
> > tool for complex configurations. It does exactly what it needs to do, if you
> 
> OK, I do not believe that this information was conveyed clearly enough.
> Apparently some setups use it for real configuration.

yeah. I've been saying "get your DE to implement support" for 7-8 years
now but saying things and being listened too are two different entities :)
xinput's main problem is that it works for the majority of use-cases, so
people use it. That's largely fine for most cases, but not when it comes to
anything even remotely sophisticated.

Cheers,
   Peter

 
> > need something that's more complicated and relies on information not
> > available to the X device itself then you'll need to write a custom tool
> > that does what you need. sorry.
> 
> Pavel, ^^^^
> 
> 
> Thanks.
> 
> -- 
> Dmitry

  reply	other threads:[~2016-07-20 22:55 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-17 17:52 v4.1 to v4.7: regression in tsc2005 driver Pavel Machek
2016-07-17 18:24 ` Michael Welling
2016-07-17 18:42   ` Pavel Machek
2016-07-17 18:51     ` Michael Welling
2016-07-17 20:03       ` Pavel Machek
2016-07-17 22:56         ` Michael Welling
2016-07-19 23:51           ` Dmitry Torokhov
2016-07-20  0:39             ` Michael Welling
2016-07-20  0:53               ` Dmitry Torokhov
2016-07-20  1:34                 ` Michael Welling
2016-07-20  1:44                   ` Dmitry Torokhov
2016-07-20  2:09                     ` Michael Welling
2016-07-20  3:49                     ` [PATCH] Input: tsc200x - Report proper input_dev name Michael Welling
2016-07-20  6:31                       ` Pavel Machek
2016-07-20  6:50                         ` Michael Welling
2016-07-20  6:54                           ` Pavel Machek
2016-07-20  7:06                             ` Michael Welling
2016-07-20  7:48                               ` Pavel Machek
2016-07-20 16:45                             ` Dmitry Torokhov
2016-07-20 16:56                               ` Pali Rohár
2016-07-20 17:04                                 ` Dmitry Torokhov
2016-07-20 17:14                                   ` Dmitry Torokhov
2016-07-20 20:25                                     ` Pavel Machek
2016-07-20 20:37                                     ` Pali Rohár
2016-07-20 16:33                 ` v4.1 to v4.7: regression in tsc2005 driver Pali Rohár
2016-07-20  1:26               ` Aaro Koskinen
2016-07-20  2:18                 ` Michael Welling
2016-07-20  6:25             ` Pavel Machek
2016-07-20 16:23               ` Dmitry Torokhov
2016-07-20 20:22                 ` Pavel Machek
2016-07-20 21:47                 ` Peter Hutterer
2016-07-20 22:20                   ` Dmitry Torokhov
2016-07-20 22:55                     ` Peter Hutterer [this message]
2016-07-21  6:32                   ` Pavel Machek
2016-07-21  6:42                     ` Peter Hutterer
2016-07-21  8:54                       ` Pavel Machek
2016-07-21  9:04                         ` Pali Rohár
2016-07-22  0:12                           ` Peter Hutterer
2016-07-25 14:59                             ` Pali Rohár
2016-07-31 21:28                               ` Peter Hutterer
2016-07-22  0:10                         ` Peter Hutterer
2016-07-22  0:57                           ` Dmitry Torokhov
2016-07-25 14:56                     ` Pali Rohár
2016-07-28 19:33                       ` Pavel Machek

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=20160720225532.GA22515@jelly \
    --to=peter.hutterer@who-t.net \
    --cc=aaro.koskinen@iki.fi \
    --cc=dmitry.torokhov@gmail.com \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwelling@ieee.org \
    --cc=pali.rohar@gmail.com \
    --cc=patrikbachan@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=serge@hallyn.com \
    --cc=sre@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).