linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev keymaps: support for force_release quirk
@ 2009-11-26 17:39 Johannes Stezenbach
  2009-11-27 15:33 ` Martin Pitt
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Johannes Stezenbach @ 2009-11-26 17:39 UTC (permalink / raw)
  To: linux-hotplug

Hi,

(please keep me Cc'd, I'm not subscribed)

following existing practice I wanted to add a quirk
for the hotkeys of the Samsung N130 in the same way
as it was done for the NC10, but was informed that
this method is no longer accepted since the quirk can
be handled in userspace using the force_release
sysfs attribute introduced in 2.6.32-rc.

http://lkml.org/lkml/2009/11/16/243

Usually it is /sys/devices/platform/i8042/serio0/force_release,
with keycodes in decimal. The default is "369-370"
(HANGEUL + HANJA keys).  The correct value for N130
would be "130-132,134,136-137,179,247,249,369-370".

(If I just add N130 to the regex in the NC10 line
in /lib/udev/rules.d/95-keymap.rules, pressing
some of the hotkeys generates an endless stream
of key events which causes the keyboard to go
dead in X. It can be brought back to life by
switching to a Linux console with Ctrl-Alt-F1 and back.)


I guess it would make sense to add support for
the forced release attribute into
extras/keymap/keymap.c in such a way that
the keymap files (e.g. samsung-other)
can have an optional third column with flags.
Since many models share samsung-other, but only
three had the force_release handled in to the kernel
I'd also add a flag to keymap.c so that the
forced_release flag is only applied when the --force-release/-f
switch is present.  The we can add two lines to 95-keymap.rules,
one for models which need the quirk and one fo the others.
On an older kernel which doesn't support the force_release
sysfs attribute the flag would be silently ignored.

Entries in samsung-other would then look like this:

0x82 switchvideomode force_release # Fn+F4 CRT/LCD (high keycode: "displaytoggle")
0x83 battery force_release,some_other_flag # Fn+F2
0x84 prog1 # Fn+F5 backlight on/off

(if there is a need for some_other_flag in the future)


Comments?  Should I go forward and try to implement it?


Thanks
Johannes

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-12-06 21:49 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-26 17:39 udev keymaps: support for force_release quirk Johannes Stezenbach
2009-11-27 15:33 ` Martin Pitt
2009-11-27 15:48 ` Johannes Stezenbach
2009-11-27 15:57 ` Martin Pitt
2009-11-28 19:14 ` Greg KH
2009-11-28 21:36 ` Johannes Stezenbach
2009-11-30 23:27 ` Johannes Stezenbach
2009-12-01  1:28 ` Kay Sievers
2009-12-01  1:37 ` Dmitry Torokhov
2009-12-01  1:49 ` Kay Sievers
2009-12-01  1:52 ` Johannes Stezenbach
2009-12-01  1:55 ` Kay Sievers
2009-12-01  2:21 ` Johannes Stezenbach
2009-12-03  3:12 ` Dmitry Torokhov
2009-12-06 21:49 ` Johannes Stezenbach

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).