Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Denis Benato" <denis.benato@linux.dev>
Cc: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com
Subject: Re: [PATCH v9 01/12] HID: asus: reinitialize the device after exiting a sleep state
Date: Fri, 09 Oct 2026 12:40:59 +0000	[thread overview]
Message-ID: <sashiko-outbox-165552@kernel.org> (raw)
In-Reply-To: <20261009122820.7603-2-denis.benato@linux.dev>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] hid: asus: missing backlight restoration in asus_reset_resume
--

commit db57f630fbe7f986dca53a47a7465f75b0c3eaab
Author: Denis Benato <denis.benato@linux.dev>

HID: asus: reinitialize the device after exiting a sleep state

The ROG ally needs to have the EC string sent back after resuming from
s2idle since the USB device can be turned completely off by the firmware
when mcu_powersave firmware-attribute is set to 1. This patch reinitializes
the reports upon device reset resume.

> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index 7dc6417fe2622..1e430ddb8605b 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c

[ ... ]

> @@ -1379,6 +1401,9 @@ static int __maybe_unused asus_reset_resume(struct hid_device *hdev)
>  {
>  	struct asus_drvdata *drvdata = hid_get_drvdata(hdev);
>  
> +	if (!drvdata->tp)
> +		asus_initialize_reports(hdev);
> +
>  	if (drvdata->tp)
>  		return asus_start_multitouch(hdev);
>  

[Severity: Low]
Since this function handles device re-initialization after power is lost
during sleep (e.g., s2idle with mcu_powersave enabled), does it also need
to restore the backlight state?

Looking at asus_resume() in the same file, it explicitly restores the
keyboard backlight:

static int __maybe_unused asus_resume(struct hid_device *hdev)
{
    ...
    if (drvdata->listener.brightness_set)
        asus_kbd_backlight_set(&drvdata->listener,
                               drvdata->kbd_backlight_brightness);
    ...
}

Will the keyboard backlight remain off if the system wakes up from a sleep
state where USB device power was cut and the USB core issues a reset_resume
rather than a standard resume?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261009122820.7603-1-denis.benato@linux.dev?part=1

  reply	other threads:[~2026-10-09 12:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 12:28 [PATCH v9 00/12] HID: asus: add support for ROG Ally handhelds Denis Benato
2026-10-09 12:28 ` [PATCH v9 01/12] HID: asus: reinitialize the device after exiting a sleep state Denis Benato
2026-10-09 12:40   ` sashiko-bot [this message]
2026-10-09 12:28 ` [PATCH v9 02/12] HID: asus: add support for ROG Ally handhelds Denis Benato
2026-10-09 12:28 ` [PATCH v9 03/12] HID: asus: add gamepad configuration Denis Benato
2026-10-09 12:28 ` [PATCH v9 04/12] HID: asus: add vibration strength configuration Denis Benato
2026-10-09 12:28 ` [PATCH v9 05/12] HID: asus: add joysticks inner and outer range configuration Denis Benato
2026-10-09 12:28 ` [PATCH v9 06/12] HID: asus: add triggers " Denis Benato
2026-10-09 12:28 ` [PATCH v9 07/12] HID: asus: add joysticks anti-deadzone configuration Denis Benato
2026-10-09 13:22   ` sashiko-bot
2026-10-09 12:28 ` [PATCH v9 08/12] HID: asus: add support for response curve Denis Benato
2026-10-09 12:28 ` [PATCH v9 09/12] HID: asus: add support to force feedback Denis Benato
2026-10-09 13:44   ` sashiko-bot
2026-10-09 12:28 ` [PATCH v9 10/12] HID: asus: add support for gamepad mode Denis Benato
2026-10-09 12:28 ` [PATCH v9 11/12] HID: asus: add support for turbo buttons Denis Benato
2026-10-09 12:28 ` [PATCH v9 12/12] HID: asus: add support for btn remapping Denis Benato
2026-10-09 14:05   ` sashiko-bot

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=sashiko-outbox-165552@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=denis.benato@linux.dev \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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