public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Éric Piel" <Eric.Piel@tremplin-utc.net>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: mitr@volny.cz, otauber@web.de, linux-kernel@vger.kernel.org,
	linux-input <linux-input@atrey.karlin.mff.cuni.cz>,
	Vojtech Pavlik <vojtech@suse.cz>
Subject: Re: [PATCH 0/2] wistron_btns: More keymaps
Date: Wed, 14 Mar 2007 16:20:01 +0100	[thread overview]
Message-ID: <45F812A1.3060108@tremplin-utc.net> (raw)
In-Reply-To: <d120d5000703140654y4d8cb0a3oafd49c48a045bd77@mail.gmail.com>

03/14/2007 02:54 PM, Dmitry Torokhov wrote/a écrit:
> Hi Eric,
> 
:
> I have couple of comments/requests:
> 
> 1. KEY_OPEN and KEY_CLOSE should not be used to signal state of the
> lid, they correspond to Accpication Control Open and Close keys from
> USB HID HUT spec:
> 
>     http://www.usb.org/developers/devclass_docs/Hut1_12.pdf
> 
> SW_LID shoudl be used to signal lid state instead.
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.


> 2. I also have a concern about using KEY_SCREEN to signal toggling
> display on and off. I am CCing Vojtech - he must know what the
> original intent of this key code was. BTW, when user presses
> corresponding button - does the display actually goes off? Maybe we
> need another switch.
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?


> 3. The number of keymap tables grew considerably ;) Do you think it
> woudl make sense to allocate memory for keymap at device creation time
> and copy selected keymap and them mark all original keymaps as
> __initdata so they are discarded one module completed initialization?
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

  reply	other threads:[~2007-03-14 15:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05 23:05 [PATCH] Wistron button support for TravelMate 610 Eric Piel
2007-03-06 13:36 ` Dmitry Torokhov
2007-03-06 15:26   ` Éric Piel
2007-03-13 23:01     ` [PATCH 0/2] wistron_btns: More keymaps Eric Piel
2007-03-14 13:54       ` Dmitry Torokhov
2007-03-14 15:20         ` Éric Piel [this message]
2007-03-14 15:44           ` Dmitry Torokhov
2007-03-14 18:25         ` Vojtech Pavlik
2007-03-14 18:58           ` Dmitry Torokhov
2007-03-14 19:02             ` Dmitry Torokhov
2007-03-14 19:12               ` Éric Piel
2007-03-14 19:02             ` Vojtech Pavlik
2007-03-15 10:26               ` Éric Piel
2007-03-18 21:10                 ` [PATCH 0/3] wistron_btns: More keymaps, take 2 Éric Piel
2007-03-27  3:39                   ` Dmitry Torokhov
2007-03-18 21:10                 ` [PATCH 1/3] wriston_btns: Add acerhk laptop database Éric Piel
2007-03-18 21:10                 ` [PATCH 2/3] wistron_btns: Generic keymap Éric Piel
2007-03-18 21:10                 ` [PATCH 3/3] wistron_btns: Declare keymaps as initdata Éric Piel
2007-03-19 21:28                 ` [PATCH 0/2] wistron_btns: More keymaps Dmitry Torokhov
2007-03-20  0:06                   ` Éric Piel
2007-03-13 23:05     ` [PATCH 1/2] wriston_btns: Add acerhk laptop database Eric Piel
2007-03-13 23:07     ` [PATCH 2/2] wistron_btns: Generic keymap Eric Piel

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=45F812A1.3060108@tremplin-utc.net \
    --to=eric.piel@tremplin-utc.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@atrey.karlin.mff.cuni.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitr@volny.cz \
    --cc=otauber@web.de \
    --cc=vojtech@suse.cz \
    /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