The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Dmitry Torokhov <dtor@insightbb.com>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH] Input: add flags bitfield
Date: Mon, 24 Mar 2008 00:25:10 -0300	[thread overview]
Message-ID: <20080324032510.GB3321@khazad-dum.debian.net> (raw)
In-Reply-To: <200803232102.07268.dtor@insightbb.com>

On Sun, 23 Mar 2008, Dmitry Torokhov wrote:
> On Saturday 22 March 2008, Henrique de Moraes Holschuh wrote:
> > On Fri, 21 Mar 2008, Henrique de Moraes Holschuh wrote:
> > > But I'd prefer if joydev and mousedev did not bind to
> > > unknown+capabilities, just in case.  Looks like bad form to me, and
> > > might bite us back later on.  We can properly fix all drivers in-tree
> > > to have suitable types for joydev and/or mousedev binds, rfkill binds,
> > > and so on after all.
> 
> Ohne word - HID.

Bleh.  In that case, it will be too ugly to have it called a type, most
of the input devices will have a type of "generic", which is at the very
least damn ugly.

> That's why I thinkg unmarked should really be default and only few selected
> devices should set their type.

I do think unmarked should be the default, and if it is so hard to have
the emulation (and other handlers) ignore unmarked, we can leave that
active by default as well.  No problems here.

What I don't like is to call it a "input device type", and have bits on
it for joystick and mouse, which almost every mouse and joystick will
NOT set.

At that point, the difference between the bitfield with a handler
whitelist (with blacklist all others implied, "Cisco ACL-style"), and a
type bitfield is just in the name.  The difference from what I already
sent you would be the name, and inverted logic (I sent you a blacklist
patch, not a whitelist patch).

IMO, it doesn't make sense to leave people wondering why their HID
devices (and most other input devices) have a type of "generic", when
they indeed are mouses, joysticks, or whatever.

Another approach would be to call the flags bitfield "emulation type",
set it to "any" as default (all bits zeroed), add one bit for every
emulation-style handler we add (e.g. mousedev and joydev, but not
rfkill), and never bind a handler to a device which has that bitfield
nonzero, unless it has the emulation bit for that handler set.

Do you *really* want a device type bitfield?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

      reply	other threads:[~2008-03-24  3:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-16 20:14 [PATCH] Input: add flags bitfield Henrique de Moraes Holschuh
2008-03-21 20:07 ` Dmitry Torokhov
2008-03-21 21:56   ` Henrique de Moraes Holschuh
2008-03-22  7:09     ` Henrique de Moraes Holschuh
2008-03-24  1:02       ` Dmitry Torokhov
2008-03-24  3:25         ` Henrique de Moraes Holschuh [this message]

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=20080324032510.GB3321@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=dtor@insightbb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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