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

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

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

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

This commit adds report initialization logic when resuming from s2idle to
handle cases where the firmware completely turns off the USB device, such
as on the ROG Ally. It introduces an asus_initialize_reports() helper
called during probe and reset_resume.

> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index baa8589d45ae2..e6218abdac49c 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c

[ ... ]

> @@ -1403,6 +1425,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);
>  
>  	return 0;
>  }

[Severity: Medium]
Does this miss restoring the backlight and OOBE disablement state?

When the system enters sleep and the USB device loses power, the USB PM
core will invoke asus_reset_resume() instead of asus_resume() upon waking.
While this commit adds report re-initialization here, it appears to miss
the backlight restoration and OOBE disablement.

For example, asus_resume() 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);

	return 0;
}

Since asus_reset_resume() does not include this restoration, the keyboard
backlight may fail to turn back on after a hard reset or power loss during
sleep. Can we safely mirror the restore sequence from asus_resume() here?

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

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 11:49 [PATCH v2 0/3] HID: asus: improve the driver support for laptops Denis Benato
2026-10-09 11:49 ` [PATCH v2 1/3] HID: asus: document and harden the worker teardown Denis Benato
2026-10-09 11:49 ` [PATCH v2 2/3] HID: asus: reinitialize the device after exiting a sleep state Denis Benato
2026-10-09 12:07   ` sashiko-bot [this message]
2026-10-09 11:49 ` [PATCH v2 3/3] HID: asus: add support for xgm led Denis Benato

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-165480@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