linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Peter Hutterer <peter.hutterer@redhat.com>,
	Benjamin Tissoires <btissoir@redhat.com>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>
Subject: Re: [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property
Date: Wed, 3 Sep 2014 13:24:52 +1000	[thread overview]
Message-ID: <20140903032451.GC17684@jelly.redhat.com> (raw)
In-Reply-To: <CANq1E4RMKmM3Qk09-hd49VSH2On_n8-x7sOp7OKd9Ww-48sLzw@mail.gmail.com>

On Tue, Sep 02, 2014 at 04:50:53PM +0200, David Herrmann wrote:
> Hi
> 
> On Tue, Sep 2, 2014 at 4:40 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> > On 09/02/2014 02:55 PM, David Herrmann wrote:
> >> Hi
> >>
> >> On Tue, Sep 2, 2014 at 2:43 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> >>> Hi,
> >>>
> >>> It is useful for userspace to know that they're not dealing with a regular
> >>> mouse but rather with a pointing stick (e.g. a trackpoint) so that userspace
> >>> can e.g. automatically enable middle button scrollwheel emulation.
> >>>
> >>> It is impossible to tell the difference from the evdev info without resorting
> >>> to putting a list of device / driver names in userspace, this is undesirable.
> >>
> >> ..so it is better to put that table into the kernel?
> >
> > No not a table, at the kernel level we actually have different drivers
> > for pointer sticks and for other mouse (and mouse like devices), so this is
> > a simple matter of adding a single line of code to all of 4 drivers.
> >
> > We could have a table in userspace matching the driver/model strings used
> > by those 4 drivers, but what if a 5th pops up ?
> 
> Ok, for now it's pretty easy as all "pointing stick" drivers are
> already separate in the kernel. But imagine a new generation of
> "pointing stick" devices is an HID device handled by hid-input.c. What
> do you do? To set the INPUT_PROPERTY bit, you need to add a driver for
> this vid/did combination. Seems overkill, so we'd probably not set
> this property bit for this device and let user-space deal with it. Now
> we end up with two places to store such information.

right now, there's no ioctl to set a property on a device. that'd be a
requirement for a udev hwdb-like thing, unless you want clients to rely on
pulling the information from two places and merging it in some strategy
that's not well defined yet.

I'm all for a userspace hwdb, but this is some bigger project that afaik
hasn't been worked on beyond the libinputmapper discussions we had a year or
so ago.

Cheers,
   Peter

> We already fix scancode/keycode mappings via hwdb as it would be
> excessive to write kernel drivers for all devices just to fix those.
> Imo, device properties are very similar to this. We have to draw a
> line between properties the kernel should detect and expose, and
> properties we detect in user-space. We already gave up defining ABS_
> axes for everything (I mean, we report all kinds of data via ABS_X,
> ranging from trackpad, to pressure and accelerometer data). User-space
> needs to detect what devices it deals with, to know what the different
> axes event-bits mean.
> 
> Yeah, the POINTING_STICK property turns out to be trivial, so please
> go ahead. I just want to remind you, that we need a user-space
> database, anyway. And hwdb entries can be added via simple distro
> updates (even users can regenerate it themselves). Kernel driver
> changes are way more heavy.. and slow.
> 
> Thanks
> David
> --

  reply	other threads:[~2014-09-03  3:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:43 [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property Hans de Goede
2014-09-02 12:43 ` [PATCH 1/2] " Hans de Goede
2014-09-02 14:34   ` Benjamin Tissoires
2014-09-03  3:18   ` Peter Hutterer
2014-09-02 12:43 ` [PATCH 2/2] input/mouse: Add missing POINTER / DIRECT properties to a bunch of drivers Hans de Goede
2014-09-02 14:38   ` Benjamin Tissoires
2014-09-03  3:21     ` Peter Hutterer
2014-09-02 12:55 ` [PATCH 0/2] input: Add INPUT_PROP_POINTING_STICK property David Herrmann
2014-09-02 14:34   ` Benjamin Tissoires
     [not found]   ` <5405D6D4.4070406@redhat.com>
2014-09-02 14:50     ` David Herrmann
2014-09-03  3:24       ` Peter Hutterer [this message]
2014-09-08 21:45 ` Dmitry Torokhov

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=20140903032451.GC17684@jelly.redhat.com \
    --to=peter.hutterer@who-t.net \
    --cc=btissoir@redhat.com \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@redhat.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).