Re: [PATCH 0/2] wistron_btns: More keymaps

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Éric Piel
Date: Wednesday, March 14, 2007 - 8:20 am

03/14/2007 02:54 PM, Dmitry Torokhov wrote/a écrit:
:
The keycodes put in the keymap are simply the same as in acerhk, just 
because I couldn't think of better. Indeed, KEY_OPEN and KEY_CLOSE seem 
to badly fit if they might be interpreted by userland as opening or 
closing a document! That would be better to generate a SW_LID event, but 
I'm not sure how to do that, is it just about using 
input_report_switch(x, SW_LID, 0 or 1) instead of using 
input_report_key()? Probably I need to update input_dev->swbit as well. 
Do I have to anything else to generate switch events?

Sincerely, I don't think anyone is using this info (especially because 
probably the info is also passed though ACPI) so that would be fine with 
me to just not generate any event :-P Tell me if you think it worths it.


Only few laptops generate an event for this key (most of the laptop 
simply switch the screen). I don't have access to any of those, so I've 
no idea if it's the userland which has to control the display or if it's 
just information for the userland. Maybe Olaf knows? I don't think it's 
possible to convert it to a switch event because it doesn't report the 
information about if screen is on or off.

On the same topic, there are some "KEY_MEDIA" generated when key to 
change display output is pressed. Is it fine for you or do have a more 
suiting keycode in mind?


In the patch, I've reduced the keymap structure to only take 32bits per 
key. So, in the absolute, it's not that terrible with each keymap taking 
about 40 bytes. Still, it wouldn't hurt to save space knowing that it's 
likely that the list keeps growing up. It shouldn't be hard to do as you 
propose with the __initdata.

I had thought about a different way: as the generic keymap should fit 
most of the laptop, we could save only the difference of a given laptop 
to this keymap (then behaving more like a "quirk"). This would have the 
advantage of saving space even in the source file ;-)

I'll try to tinker a bit with both approaches and see what fit best. 
Anyway, is it ok for you to merge those patches first and later I'll 
come up with a space-saver patch?

See you,
Eric
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Wistron button support for TravelMate 610, Eric Piel, (Mon Mar 5, 4:05 pm)
Re: [PATCH] Wistron button support for TravelMate 610, Dmitry Torokhov, (Tue Mar 6, 6:36 am)
[PATCH 0/2] wistron_btns: More keymaps, Eric Piel, (Tue Mar 13, 4:01 pm)
[PATCH 2/2] wistron_btns: Generic keymap, Eric Piel, (Tue Mar 13, 4:07 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Dmitry Torokhov, (Wed Mar 14, 6:54 am)
Re: [PATCH 0/2] wistron_btns: More keymaps, Éric Piel, (Wed Mar 14, 8:20 am)
Re: [PATCH 0/2] wistron_btns: More keymaps, Dmitry Torokhov, (Wed Mar 14, 8:44 am)
Re: [PATCH 0/2] wistron_btns: More keymaps, Vojtech Pavlik, (Wed Mar 14, 11:25 am)
Re: [PATCH 0/2] wistron_btns: More keymaps, Dmitry Torokhov, (Wed Mar 14, 11:58 am)
Re: [PATCH 0/2] wistron_btns: More keymaps, Dmitry Torokhov, (Wed Mar 14, 12:02 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Vojtech Pavlik, (Wed Mar 14, 12:02 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Éric Piel, (Wed Mar 14, 12:12 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Éric Piel, (Thu Mar 15, 3:26 am)
[PATCH 0/3] wistron_btns: More keymaps, take 2, Éric Piel, (Sun Mar 18, 2:10 pm)
[PATCH 1/3] wriston_btns: Add acerhk laptop database, Éric Piel, (Sun Mar 18, 2:10 pm)
[PATCH 2/3] wistron_btns: Generic keymap, Éric Piel, (Sun Mar 18, 2:10 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Dmitry Torokhov, (Mon Mar 19, 2:28 pm)
Re: [PATCH 0/2] wistron_btns: More keymaps, Éric Piel, (Mon Mar 19, 5:06 pm)
Re: [PATCH 0/3] wistron_btns: More keymaps, take 2, Dmitry Torokhov, (Mon Mar 26, 8:39 pm)