X86 platform drivers
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Stefan Seyfried <stefan.seyfried@googlemail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Kenneth Chan <kenneth.t.chan@gmail.com>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Stefan Seyfried <seife+kernel@b1-systems.com>
Subject: Re: [PATCH 2/2] platform/x86: panasonic-laptop: allow to use all hotkeys
Date: Wed, 15 Jun 2022 21:28:35 +0200	[thread overview]
Message-ID: <6969ca0e-4a4c-c995-02a2-6645f875338c@redhat.com> (raw)
In-Reply-To: <d80789bc-a8fc-de5f-164a-75adf7097311@message-id.googlemail.com>

Hi Stefan,

On 6/15/22 19:10, Stefan Seyfried wrote:
> Hi Andy,
> 
> On 15.06.22 13:24, Andy Shevchenko wrote:
>> On Wed, Jun 15, 2022 at 1:21 PM Andy Shevchenko
>> <andy.shevchenko@gmail.com> wrote:
>>> On Sun, Jun 12, 2022 at 3:54 PM <stefan.seyfried@googlemail.com> wrote:
>>
>>> We usually add module options in very bad cases where it's very useful
>>> for debugging or when some devices require the opposite settings while
>>> can't be distinguished automatically. Here I do not see either of such
>>> cases. Hence, I would prefer to see a DMI based quirk as it's done a
>>> lot in the PDx86 drivers. Can you do that?
> 
> I can do that, but... below ;-)
> 
>> Looking into the code of the culprit patch, have you tried to add a
>> debug pr_info() and see what value is in the result? Perhaps you may
>> just sort out by correcting that.
> 
> The driver is working fine, it's just that Kenneth's machine is getting most of the hotkey events (I'd guess all but sleep, hibernate, battery) twice. That's why he disabled the key generation from the panasonic_acpi driver for them. (My guess is that on his CF-W5, they are also coming in via normal keyboard input path). My CF-51 does only generate them via acpi, so if they are not generated, I get nothing.
> Hence the module parameter so that the two known users of this module (Kenneth and me) can adjust this to their needs.
> 
> Now about the DMI match: I can do that.
> But let's face it: the panasonic laptops are pretty rare in the wild, so even if I'm "whitelisting" the CF-51, then probably other models will need the same treatment and we have no real way of finding out which ones, unless people complain. (For example my CF-51 is about 17 years old now and I just pulled it out and updated it to the latest and greatest "because I can". That's also why it has taken me so long to even notice the driver was broken for me. So people not complaining will not mean "nothing is broken" but rather "this code has not many users").
> So even if I add the DMI match (which is a good idea anyhow because then "my" model will work out of the box, while right now I need to add a module parameter or switch it on later), I'd still vote for having a possibility for overriding the DMI results.
> Would that be OK?

Actually I agree with your original assessment that Kenneth's patch
(ed83c9171829) which broke things on your laptop is wrong.

Back then I did not properly realize that it is effectively
disabling event generation for most of the reported event codes.

If anything there should be a DMI match for Kenneth's model and
reporting the events normally should be the default.

Kenneth, can you check with e.g. evemu-record or evtest
where the double events are coming from ?  Obviously one of
the events is coming from the panasonic-laptop driver, but
where is the other event coming from. Is it coming from the
atkbd driver; or ... ?   Maybe from the acpi-video driver
for the brightness keys ?

Regards,

Hans



  reply	other threads:[~2022-06-15 19:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 18:14 [PATCH 0/9] platform/x86: panasonic-laptop: add optical drive, brightness and battery charging threshold Kenneth Chan
2020-08-21 18:14 ` [PATCH 1/9] add support for optical driver power in Y and W series Kenneth Chan
2020-11-10 14:00   ` Hans de Goede
2020-08-21 18:14 ` [PATCH 2/9] replace ACPI prints with pr_*() macros Kenneth Chan
2020-08-21 18:14 ` [PATCH 3/9] split MODULE_AUTHOR() by one author per macro call Kenneth Chan
2020-08-21 18:14 ` [PATCH 4/9] fix naming of platform files for consistency with other modules Kenneth Chan
2020-08-21 18:14 ` [PATCH 5/9] fix sticky key init bug Kenneth Chan
2020-08-21 18:14 ` [PATCH 6/9] add write support to mute Kenneth Chan
2020-08-21 18:14 ` [PATCH 7/9] resolve hotkey double trigger bug Kenneth Chan
2022-06-12  9:05   ` [PATCH 0/2] fix panasonic-laptop hotkey regression stefan.seyfried
2022-06-12  9:05     ` [PATCH 1/2] platform/x86: panasonic-laptop: de-obfuscate button codes stefan.seyfried
2022-06-12  9:05     ` [PATCH 2/2] platform/x86: panasonic-laptop: allow to use all hotkeys stefan.seyfried
2022-06-15 10:53       ` Kenneth Chan
2022-06-15 11:21       ` Andy Shevchenko
2022-06-15 11:24         ` Andy Shevchenko
2022-06-15 17:10           ` Stefan Seyfried
2022-06-15 19:28             ` Hans de Goede [this message]
2022-06-16 18:38               ` Kenneth Chan
2022-06-16 19:03               ` Andy Shevchenko
2022-06-17  7:51               ` Kenneth Chan
2022-06-17 11:07                 ` Hans de Goede
2022-06-17 13:07                   ` Stefan Seyfried
2022-06-20 15:08                     ` Hans de Goede
2022-06-20 18:10                       ` Stefan Seyfried
2022-06-21  9:26                         ` Hans de Goede
2022-06-21 10:23                           ` Stefan Seyfried
2022-06-21 17:54                             ` Stefan Seyfried
2022-06-22 10:57                               ` Hans de Goede
2022-06-20 15:21                   ` Kenneth Chan
2022-06-21  9:34                     ` Hans de Goede
2022-06-24  5:14                       ` Kenneth Chan
2022-06-24  9:24                         ` Hans de Goede
2020-08-21 18:14 ` [PATCH 8/9] add support for battery charging threshold (eco mode) Kenneth Chan
2020-08-21 18:14 ` [PATCH 9/9] add platform devices for firmware brightness registers Kenneth Chan
2020-08-22  7:29 ` [PATCH 0/9] platform/x86: panasonic-laptop: add optical drive, brightness and battery charging threshold Harald Welte
2020-08-22  8:20   ` Andy Shevchenko

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=6969ca0e-4a4c-c995-02a2-6645f875338c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=kenneth.t.chan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=seife+kernel@b1-systems.com \
    --cc=stefan.seyfried@googlemail.com \
    /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