From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: Jarod Wilson <jarod@wilsonet.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [IR-RFC PATCH v4 0/6] In-kernel IR support using evdev
Date: Sat, 28 Nov 2009 23:21:27 -0800 [thread overview]
Message-ID: <20091129072126.GW6936@core.coreip.homeip.net> (raw)
In-Reply-To: <9e4733910911261934u43804e4bt6baa4302f302b536@mail.gmail.com>
On Thu, Nov 26, 2009 at 10:34:55PM -0500, Jon Smirl wrote:
> On Thu, Nov 26, 2009 at 10:12 PM, Jarod Wilson <jarod@wilsonet.com> wrote:
> > This part... Not so wild about. The common thought I'm seeing from people is
> > that we should be using setkeycode to load keymaps. I mean, sure, I suppose
> > this could be abstracted away so the user never sees it, but it seems to be
> > reinventing a way to set up key mapping when setkeycode already exists, and
> > is used by a number of existing IR devices in the v4l/dvb subsystem (as well
> > as misc things like the ati rf remotes, iirc). Is there some distinct
> > advantage to going this route vs. setkeycode that I'm missing?
>
> The configfs scheme and keymaps offer the same abilities. One is an
> ancient binary protocol and the other one uses Unix standard commands
> like mkdir and echo to build the map. You need special commands -
> setkeycodes, getkeycodes, showkey, loadkeys, xmodmap, dump-keys to use
> a keymap. I've been using Linux forever and I can't remember how
> these commands work.
Nor you really should - it all is mostly being used transparently for
the end-user. I mean udev loading your laptop-specific keymap is not
using loadkeys but specially written utility that issues EVIOCSKEYCODE
directly.
>
> Keymaps are a binary protocol written by Risto Kankkunen in 1993.
> Configfs was added by Oracle about two years ago but it has not been
> used for mapping purposes.
Nor it is even enabled by default... Do we want to make in mandatory on
all consumer systems out there?
>
> It's another discussion, but if IR goes the configfs route I'd
> consider writing a patch to switch keymaps/keycodes onto the configfs
> model. It is a huge advantage to get rid of these pointless special
> purpose commands that nobody knows how to use. I'd keep the legacy
> IOCTLs working and redirect the data structure to a configfs one
> instead of the existing structure.
What is the memory footprint for configfs solution though? I would hate
to see the cost of user-modifiable keymap explode tenfold so that we can
rely less (not even get rid of, since it is published userspace API/ABI)
on setkeycodes and related ioctls.
>
> The same idea is behind getting rid of IOCTLs and using sysfs. Normal
> Unix commands can manipulate sysfs. IOCTLs have problems with strace,
> endianess and the size of int (32/64b).
The size of long you mean, right? Besides, now that we know better we
should simply use explicitely-sized fields in ioctl structures.
--
Dmitry
next prev parent reply other threads:[~2009-11-29 7:21 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-27 1:34 [IR-RFC PATCH v4 0/6] In-kernel IR support using evdev Jon Smirl
2009-11-27 1:34 ` [IR-RFC PATCH v4 1/6] Minimal changes to the core input system Jon Smirl
2009-11-27 1:34 ` [IR-RFC PATCH v4 2/6] Core IR module Jon Smirl
2009-11-29 17:14 ` Greg KH
2009-11-29 17:37 ` Jon Smirl
2009-11-29 19:09 ` Greg KH
2009-11-29 17:17 ` Greg KH
2009-11-29 17:41 ` Jon Smirl
2009-11-29 19:09 ` Greg KH
2009-11-27 1:34 ` [IR-RFC PATCH v4 3/6] Configfs support for IR Jon Smirl
2009-11-27 1:34 ` [IR-RFC PATCH v4 4/6] GPT driver for in-kernel IR support Jon Smirl
2009-11-27 1:34 ` [IR-RFC PATCH v4 5/6] Example of PowerPC device tree support for GPT based IR Jon Smirl
2009-11-27 1:34 ` [IR-RFC PATCH v4 6/6] Microsoft mceusb2 driver for in-kernel IR subsystem Jon Smirl
2009-11-27 3:12 ` [IR-RFC PATCH v4 0/6] In-kernel IR support using evdev Jarod Wilson
2009-11-27 3:34 ` Jon Smirl
2009-11-29 7:21 ` Dmitry Torokhov [this message]
2009-11-27 3:58 ` Jon Smirl
2009-11-29 7:34 ` Dmitry Torokhov
2009-11-27 7:22 ` Stefan Richter
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=20091129072126.GW6936@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=jarod@wilsonet.com \
--cc=jonsmirl@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.