All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark Pearson" <mpearson-lenovo@squebb.ca>
To: "Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Henrique de Moraes Holschuh" <hmh@hmh.eng.br>
Cc: ibm-acpi-devel@lists.sourceforge.net,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	"Nitin Joshi1" <njoshi1@lenovo.com>,
	"Vishnu Sankar" <vishnuocv@gmail.com>
Subject: Re: [ibm-acpi-devel] [PATCH 00/24] platform/x86: thinkpad_acpi: Refactor hotkey handling and add support for some new hotkeys
Date: Sun, 21 Apr 2024 20:36:54 -0400	[thread overview]
Message-ID: <ae6b2dd6-3659-4d12-a25f-93e5966e6a00@app.fastmail.com> (raw)
In-Reply-To: <9c3835d4-0241-4483-8527-dc789fdd8597@app.fastmail.com>

On Sun, Apr 21, 2024, at 1:17 PM, Mark Pearson wrote:
> Thanks Hans!
>
> On Sun, Apr 21, 2024, at 11:44 AM, Hans de Goede wrote:
>> Hi All,
>>
>> My reply in the "[PATCH v2 1/4] platform/x86: thinkpad_acpi:
>> simplify known_ev handling" handling where I indicated that I would work
>> on converting the thinkpad_acpi hotkey handling to use sparse-keymaps
>> underestimated the work this required quite a bit.
>>
>> The hotkey code is quite old and crufty and full of special cases to
>> support many generations of ThinkPads, so I ended up doing some
>> significant refactoring and cleanup before doing the actual conversion
>> to sparse-keymaps.
>>
>> I have been vary careful to not introduce any changes wrt support for
>> the original ThinkPad models / hotkeys which use the hotkey_*_mask
>> related code.
>>
>> I've also done my best to avoid any *significant* functional change but
>> there are still some functional changes, which should all not impact
>> userspace compatibility:
>>
>> 1. Adaptive keyboard special keys will now also send EV_MSC events with
>>    the scancode, just like all the other hotkeys.
>>
>> 2. Rely on the input core for KEY_RESERVED suppression. This means that
>>    keys marked as KEY_RESERVED will still send EV_MSC evdev events when
>>    pressed (which helps users with mapping them to non reserved KEY_FOO
>>    values if desired).
>>
>> 3. Align the keycodes for volume up/down/mute and brightness up/down with
>>    those set by userspace through udev upstream's hwdb. Note these are all
>>    for keys which are suppressed by hotkey_reserved_mask by default.
>>    So this is only a functional change for users who override the default
>>    hotkey-mask *and* who do not have udev's default hwdb installed.
>>
>> 4. Suppress ACPI netlink event generation for unknown 0x1xxx hkey events to
>>    avoid userspace starting to rely on the netlink events for new hotkeys
>>    before these have been added to the keymap, only to have the netlink
>>    events get disabled by the adding of the new hotkeys to the keymap.
>>
>>    This should not cause a behavior change for existing models since all
>>    currently known 0x1xxx events have a mapping.
>>
>> Here is a quick breakdown of the patches in this series:
>>
>> Patch 1 - 2: Fix a small locking issue on rmmod the only problem here
>>    really is a lockdep warning, so I plan to route these fixes through
>>    for-next together with the rest to keep things simple.
>>
>> Patch 3 - 14: Do a bunch of cleanups and refactoring
>>
>> Patch 15: Implements functional change no 4. I really kinda want to just
>>    completely disable ACPI netlink event generation when also sending evdev
>>    events instead of reporting these twice. But for the 0x11xx / 0x13xx
>>    hkey events the kernel has send ACPI netlink events for years now. So
>>    this disables ACPI netlink events for any new hotkeys going forward.
>>
>> Patch 16 - 18: Refactor / cleanup reserved key handling
>>
>> Patch 19: Actually move to sparse-keymaps
>>
>> Patch 20: Update the keymap for 2 adaptive kbd Fn row keys
>>
>> Patch 21 - 24: Mark's original patches adding support for the new Fn + N
>>    key combo and for trackpoint doubletap slightly reworked to use
>>    the new sparse-keymap.
>>
>> Mark if you can make some time to review patches 1-20 that would be great.
>>
> Definitely will do.
>
> I'll do some testing on platforms here as much as I can. If there's 
> anything in particular that you think is worth taking extra care over 
> let me know (with a caveat that my team doesn't have all the platforms, 
> and for anything older than 5 years it can be hard to get hold of them)
>
> Thanks for your work on this.
>
> Mark
>
I've tested the series on a couple of platforms (Z13 G2 and X1 Carbon G12) and so far all looking good.
 - tried all hotkey combinations that are supported that I can think of and they work - including brightness control, volume control, platform profile toggle, airplane, snipping tool and privacy screen.
 - trackpoint double tap is working well on the Z13 G2 (set up custom key setting in gnome-settings and launched browser on a doubletap)
 - FN+N is working well on the X1 Carbon G12 (tested with evtest to confirm vendor key generated)

So for the series:
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>

I have read through the patches, but not in enough depth for it to count as a review yet. Need a bit more time for that.

Mark

      reply	other threads:[~2024-04-22  0:37 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-21 15:44 [PATCH 00/24] platform/x86: thinkpad_acpi: Refactor hotkey handling and add support for some new hotkeys Hans de Goede
2024-04-21 15:44 ` [PATCH 01/24] platform/x86: thinkpad_acpi: Take hotkey_mutex during hotkey_exit() Hans de Goede
2024-04-21 15:44 ` [PATCH 02/24] platform/x86: thinkpad_acpi: Provide hotkey_poll_stop_sync() dummy Hans de Goede
2024-04-21 15:44 ` [PATCH 03/24] platform/x86: thinkpad_acpi: Drop setting send_/ignore_acpi_ev defaults twice Hans de Goede
2024-04-22  8:07   ` Ilpo Järvinen
2024-04-22  8:11     ` Andy Shevchenko
2024-04-22  8:24       ` Ilpo Järvinen
2024-04-23 14:00     ` Hans de Goede
2024-04-21 15:45 ` [PATCH 04/24] platform/x86: thinkpad_acpi: Drop ignore_acpi_ev Hans de Goede
2024-04-21 15:45 ` [PATCH 05/24] platform/x86: thinkpad_acpi: Use tpacpi_input_send_key() in adaptive kbd code Hans de Goede
2024-04-22  8:11   ` Ilpo Järvinen
2024-04-21 15:45 ` [PATCH 06/24] platform/x86: thinkpad_acpi: Do hkey to scancode translation later Hans de Goede
2024-04-21 15:45 ` [PATCH 07/24] platform/x86: thinkpad_acpi: Make tpacpi_driver_event() return if it handled the event Hans de Goede
2024-04-21 15:45 ` [PATCH 08/24] platform/x86: thinkpad_acpi: Move adaptive kbd event handling to tpacpi_driver_event() Hans de Goede
2024-04-22  8:29   ` Ilpo Järvinen
2024-04-22 11:35     ` Andy Shevchenko
2024-04-23 14:03     ` Hans de Goede
2024-04-22 19:27   ` Mark Pearson
2024-04-23  8:35     ` Hans de Goede
2024-04-23 12:15       ` Mark Pearson
2024-04-23 13:53         ` Hans de Goede
2024-04-21 15:45 ` [PATCH 09/24] platform/x86: thinkpad_acpi: Move special original hotkeys handling out of switch-case Hans de Goede
2024-04-21 15:45 ` [PATCH 10/24] platform/x86: thinkpad_acpi: Move hotkey_user_mask check to tpacpi_input_send_key() Hans de Goede
2024-04-21 15:45 ` [PATCH 11/24] platform/x86: thinkpad_acpi: Always call tpacpi_driver_event() for hotkeys Hans de Goede
2024-04-21 15:45 ` [PATCH 12/24] platform/x86: thinkpad_acpi: Drop tpacpi_input_send_key_masked() and hotkey_driver_event() Hans de Goede
2024-04-21 15:45 ` [PATCH 13/24] platform/x86: thinkpad_acpi: Move hkey > scancode mapping to tpacpi_input_send_key() Hans de Goede
2024-04-21 15:45 ` [PATCH 14/24] platform/x86: thinkpad_acpi: Move tpacpi_driver_event() call " Hans de Goede
2024-04-21 15:45 ` [PATCH 15/24] platform/x86: thinkpad_acpi: Do not send ACPI netlink events for unknown hotkeys Hans de Goede
2024-04-21 15:45 ` [PATCH 16/24] platform/x86: thinkpad_acpi: Change hotkey_reserved_mask initialization Hans de Goede
2024-04-21 15:45 ` [PATCH 17/24] platform/x86: thinkpad_acpi: Use correct keycodes for volume and brightness keys Hans de Goede
2024-04-21 19:11   ` Andy Shevchenko
2024-04-23 14:06     ` Hans de Goede
2024-04-21 15:45 ` [PATCH 18/24] platform/x86: thinkpad_acpi: Drop KEY_RESERVED special handling Hans de Goede
2024-04-21 15:45 ` [PATCH 19/24] platform/x86: thinkpad_acpi: Switch to using sparse-keymap helpers Hans de Goede
2024-04-21 15:45 ` [PATCH 20/24] platform/x86: thinkpad_acpi: Add mappings for adaptive kbd clipping-tool and cloud keys Hans de Goede
2024-04-21 15:45 ` [PATCH 21/24] platform/x86: thinkpad_acpi: Simplify known_ev handling Hans de Goede
2024-04-21 15:45 ` [PATCH 22/24] platform/x86: thinkpad_acpi: Support for trackpoint doubletap Hans de Goede
2024-04-21 15:45 ` [PATCH 23/24] platform/x86: thinkpad_acpi: Support for system debug info hotkey Hans de Goede
2024-04-21 15:45 ` [PATCH 24/24] platform/x86: thinkpad_acpi: Support hotkey to disable trackpoint doubletap Hans de Goede
2024-04-21 17:17 ` [PATCH 00/24] platform/x86: thinkpad_acpi: Refactor hotkey handling and add support for some new hotkeys Mark Pearson
2024-04-22  0:36   ` Mark Pearson [this message]

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=ae6b2dd6-3659-4d12-a25f-93e5966e6a00@app.fastmail.com \
    --to=mpearson-lenovo@squebb.ca \
    --cc=andy@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=hmh@hmh.eng.br \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=njoshi1@lenovo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=vishnuocv@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.