linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Oleksandr Natalenko <oleksandr@natalenko.name>
Cc: Mario Limonciello <mario_limonciello@dell.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: Dell Vostro 3360 multimedia keys
Date: Tue, 21 Nov 2017 19:36:24 +0100	[thread overview]
Message-ID: <201711211936.25184@pali> (raw)
In-Reply-To: <1716681.OUoELY8X92@natalenko.name>

[-- Attachment #1: Type: Text/Plain, Size: 3241 bytes --]

Hi!

On Tuesday 21 November 2017 15:52:28 Oleksandr Natalenko wrote:
> Hi, Pali et al.
> 
> Answers go inline.
> 
> On úterý 21. listopadu 2017 14:51:10 CET Pali Rohár wrote:
> > What would happen if you enable wmi_requires_smbios_request?
> > Nothing? And situation is exactly same?
> 
> Yes, this is what I did with DMI quirk which enables
> wmi_requires_smbios_request. Keys "1" and "2" behave the same, key
> "3" gets reported via both atkbd and wmi (see my thoughts about this
> key below).

Ok, if wmi_requires_smbios_request is really doing nothing, then it 
should not be used. It enables some QSET feature in Dell SMM mode which 
is for 2 laptops.

> > > +	/* Dell Vostro 3360 combined keycode */
> > > +	{ KE_KEY,    0xe0f1, { KEY_PROG1 } },
> > > +	{ KE_KEY,    0xe0f2, { KEY_PROG2 } },
> > 
> > What is purpose of those two keys? Does not linux kernel already
> > have better description for them as KEY_PROG1 and KEY_PROG2?
> 
> Well, I didn't find KEY_PROG1/KEY_PROG2 in 0000 table. Thus, I just
> added them. Actually, since these keys have some icons drawn on
> them, they have some designated purpose (most likely,
> Windows-related), but I'd rather think of them as of custom
> programmable keys without any specific function assigned.

Looks like that Dell Vostro 3360 have this meaning for multimedia keys:

first key: Mobility Center
second key: Dell Support Center
third key: Dell Instant Launch Manager

(same as other Vostro laptops)

But do not know what KEY_* are used on other Vostro laptops for those 
keys. It would be great to use same KEY_*...

> > /* snip */
> > 
> > > Third key (the one that is handled via PS/2 keyboard) produces
> > > this in the
> > 
> > > kernel buffer:
> > / *snip */
> > 
> > Seems you still have not configured keycode for your internal PS/2
> > keyboard to make this key working. Use 'setkeycodes 60 <keycode>'
> > as written in dmesg.
> 
> Well, I've tried. The problem is that if I even configure this key
> via setkeycodes, it doesn't work.

Hm... why it does not work?

CCing Dmitry, can you tell us what needs to be done to "active" key from 
AT Keyboard driver which prints following messages to dmesg?

===
Nov 20 15:36:51 spock kernel: atkbd serio0: Unknown key pressed 
(translated set 2, code 0x60 on isa0060/serio0).
Nov 20 15:36:51 spock kernel: atkbd serio0: Use 'setkeycodes 60 
<keycode>' to make it known.
===

I was in impression that if we see such message in dmesg, then key is 
working fine...

> evtest shows me "value 2" (the
> same value is shown if I press and hold some ordinary key, like "A",
> for instance) instead of 0 and/or 1. Looks like key press event is
> not generated properly by this key via atkbd.
> 
> That's why I think wmi_requires_smbios_request quirk must be
> permanently enabled for this laptop, and 3rd key must be handled via
> wmi (like two other keys), not via atkbd. And all atkbd events from
> this key must be just suppressed via userspace.

In dell-wmi we filter all key events which are also delivered via PS/2 
AT Keyboard driver. So filtering PS/2 keys instead of WMI is anti-design 
solution.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2017-11-21 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 15:08 Dell Vostro 3360 multimedia keys Oleksandr Natalenko
2017-11-20 17:05 ` Pali Rohár
2017-11-20 21:31   ` Oleksandr Natalenko
2017-11-21 13:51     ` Pali Rohár
2017-11-21 14:52       ` Oleksandr Natalenko
2017-11-21 18:36         ` Pali Rohár [this message]
2017-11-21 18:58           ` Oleksandr Natalenko
2018-01-27 14:05             ` Pali Rohár
2018-01-28  4:39               ` Dmitry Torokhov
2017-11-27 16:56           ` Mario.Limonciello
2017-11-27 18:32             ` Oleksandr Natalenko
2017-11-27 19:21               ` Mario.Limonciello
2017-11-21 14:52       ` Oleksandr Natalenko

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=201711211936.25184@pali \
    --to=pali.rohar@gmail.com \
    --cc=andy@infradead.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario_limonciello@dell.com \
    --cc=mjg59@srcf.ucam.org \
    --cc=oleksandr@natalenko.name \
    --cc=platform-driver-x86@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 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).