From: "Luke D. Jones" <luke@ljones.dev>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: linux-kernel@vger.kernel.org, hdegoede@redhat.com,
ilpo.jarvinen@linux.intel.com,
platform-driver-x86@vger.kernel.org, linux-input@vger.kernel.org,
bentiss@kernel.org, jikos@kernel.org, mario.limonciello@amd.com
Subject: Re: [PATCH v4 0/2] hid-asus: asus-wmi: refactor Ally suspend/resume
Date: Mon, 24 Mar 2025 14:41:40 +1300 [thread overview]
Message-ID: <deeb4946-dd66-4a82-a8f0-5e8b1751899e@ljones.dev> (raw)
In-Reply-To: <CAGwozwE4oXmFMRO5jZJC4d11TstTqSC8ZUZ1CCkZMWYZKTKF_w@mail.gmail.com>
On 24/03/25 00:41, Antheas Kapenekakis wrote:
> On Sun, 23 Mar 2025 at 03:34, Luke Jones <luke@ljones.dev> wrote:
>>
>> This short series refactors the Ally suspend/resume functionality in the
>> asus-wmi driver along with adding support for ROG Ally MCU version checking.
>>
>> The version checking is then used to toggle the use of older CSEE call hacks
>> that were initially used to combat Ally suspend/wake issues arising from the MCU
>> not clearing a particular flag on resume. ASUS have since corrected this
>> especially for Linux in newer firmware versions.
>>
>> - hid-asus requests the MCU version and displays a warning if the version is
>> older than the one that fixes the issue.
>> - hid-asus awill also toggle the CSEE hack off, and mcu_powersave to on if the
>> version is high enough.
>>
>> *Note: In review it was requested by Mario that I try strsep() for parsing
>> the version. I did try this and a few variations but the result was much
>> more code due to having to check more edge cases due to the input being
>> raw bytes. In the end the cleaned up while loop proved more robust.
>>
>> - Changelog:
>> + V2: https://lore.kernel.org/platform-driver-x86/20250226010129.32043-1-luke@ljones.dev/T/#t
>> - Adjust warning message to explicitly mention suspend issues
>
> How did the testing go with this one, especially with mcu_powersave 0?
Appears to be good. Checked a few reboots with powersave off - it is
setting on as I expect every time. Did modules unload/load also. And
tested with it set off after boot plus suspend resumes.
Very much hope this is the end of that particular saga, and with
bazzites help we can hopefully get everyone on November MCU FW or later,
then finally remove the hack completely this year.
A small side note - I expect ASUS to fully reuse the X hardware, or at
least the bios/acpi/mcu-fw for that new windows handheld they've doing,
so fingers crossed that they actually do, and there will be nomore
suspend issues with current kernels plus this patch.
Cheers,
Luke.
>> - Use switch/case block to set min_version
>> - Set min_version to 0 by default and toggle hacks off
>> + V3
>> - Remove noise (excess pr_info)
>> - Use kstrtoint, not kstrtolong
>> - Use __free(kfree) for allocated mem and drop goto + logging
>> - Use print_hex_dump() to show failed data after pr_err in mcu_request_version()
>> - Use pr_debug in set_ally_mcu_hack() and set_ally_mcu_powersave() plus
>> correct the message.
>> + V4
>> - Change use_ally_mcu_hack var to enum to track init state and
>> prevent a race condition
>>
>> Luke D. Jones (2):
>> hid-asus: check ROG Ally MCU version and warn
>> platform/x86: asus-wmi: Refactor Ally suspend/resume
>>
>> drivers/hid/hid-asus.c | 111 ++++++++++++++++-
>> drivers/platform/x86/asus-wmi.c | 133 +++++++++++++++------
>> include/linux/platform_data/x86/asus-wmi.h | 19 +++
>> 3 files changed, 222 insertions(+), 41 deletions(-)
>>
>> --
>> 2.49.0
>>
next prev parent reply other threads:[~2025-03-24 1:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-23 2:34 Luke Jones
2025-03-23 2:34 ` [PATCH v4 1/2] hid-asus: check ROG Ally MCU version and warn Luke Jones
2025-03-25 1:27 ` Mario Limonciello
2025-03-23 2:34 ` [PATCH v4 2/2] platform/x86: asus-wmi: Refactor Ally suspend/resume Luke Jones
2025-03-24 12:10 ` Ilpo Järvinen
2025-03-24 22:39 ` Luke D. Jones
2025-03-25 1:28 ` Mario Limonciello
2025-08-20 3:47 ` Jiri Slaby
2025-03-23 11:41 ` [PATCH v4 0/2] hid-asus: asus-wmi: refactor " Antheas Kapenekakis
2025-03-24 1:41 ` Luke D. Jones [this message]
2025-03-24 8:11 ` Antheas Kapenekakis
2025-03-24 10:33 ` Luke D. Jones
2025-03-24 14:46 ` Antheas Kapenekakis
2025-03-24 23:43 ` Luke D. Jones
2025-03-24 23:47 ` Antheas Kapenekakis
2025-05-05 13:52 ` Ilpo Järvinen
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=deeb4946-dd66-4a82-a8f0-5e8b1751899e@ljones.dev \
--to=luke@ljones.dev \
--cc=bentiss@kernel.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@antheas.dev \
--cc=mario.limonciello@amd.com \
--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
all inboxes | Powered by JetHome®