From: Denis Benato <denis.benato@linux.dev>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Hans de Goede" <hansg@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"Linux ACPI" <linux-acpi@vger.kernel.org>,
platform-driver-x86@vger.kernel.org,
"Corentin Chary" <corentin.chary@gmail.com>,
"Luke D. Jones" <luke@ljones.dev>,
"João Paulo Rechi Vita" <jprvita@gmail.com>
Subject: Re: [PATCH v1 1/4] platform/x86: asus-laptop: Register ACPI notify handler directly
Date: Sat, 28 Feb 2026 17:59:16 +0100 [thread overview]
Message-ID: <f55a6814-862e-46a9-91ca-f7bbf6921dde@linux.dev> (raw)
In-Reply-To: <5082508.31r3eYUQgx@rafael.j.wysocki>
On 2/28/26 16:10, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>
> To facilitate subsequent conversion of the driver to a platform one,
> make it install an ACPI notify handler directly instead of using
> a .notify() callback in struct acpi_driver.
>
> No intentional functional impact.
Reviewed-by: Denis Benato <denis.benato@linux.dev>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/platform/x86/asus-laptop.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
> index d96f6af26ff7..c927665dfa96 100644
> --- a/drivers/platform/x86/asus-laptop.c
> +++ b/drivers/platform/x86/asus-laptop.c
> @@ -1517,9 +1517,9 @@ static void asus_input_exit(struct asus_laptop *asus)
> /*
> * ACPI driver
> */
> -static void asus_acpi_notify(struct acpi_device *device, u32 event)
> +static void asus_acpi_notify(acpi_handle handle, u32 event, void *data)
> {
> - struct asus_laptop *asus = acpi_driver_data(device);
> + struct asus_laptop *asus = data;
> u16 count;
>
> /* TODO Find a better way to handle events count. */
> @@ -1881,6 +1881,11 @@ static int asus_acpi_add(struct acpi_device *device)
> if (result && result != -ENODEV)
> goto fail_pega_rfkill;
>
> + result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY,
> + asus_acpi_notify, asus);
> + if (result)
> + goto fail_pega_rfkill;
> +
> asus_device_present = true;
> return 0;
>
> @@ -1906,6 +1911,7 @@ static void asus_acpi_remove(struct acpi_device *device)
> {
> struct asus_laptop *asus = acpi_driver_data(device);
>
> + acpi_dev_remove_notify_handler(device, ACPI_DEVICE_NOTIFY, asus_acpi_notify);
> asus_backlight_exit(asus);
> asus_rfkill_exit(asus);
> asus_led_exit(asus);
> @@ -1932,7 +1938,6 @@ static struct acpi_driver asus_acpi_driver = {
> .ops = {
> .add = asus_acpi_add,
> .remove = asus_acpi_remove,
> - .notify = asus_acpi_notify,
> },
> };
>
next prev parent reply other threads:[~2026-02-28 16:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 15:09 [PATCH v1 0/4] platform/x86: asus: Bind drivers to platform devices instead of ACPI ones Rafael J. Wysocki
2026-02-28 15:10 ` [PATCH v1 1/4] platform/x86: asus-laptop: Register ACPI notify handler directly Rafael J. Wysocki
2026-02-28 16:59 ` Denis Benato [this message]
2026-02-28 15:11 ` [PATCH v1 2/4] platform/x86: asus-laptop: Convert ACPI driver to a platform one Rafael J. Wysocki
2026-02-28 17:01 ` Denis Benato
2026-03-01 13:08 ` Rafael J. Wysocki
2026-03-02 11:21 ` Ilpo Järvinen
2026-02-28 15:12 ` [PATCH v1 3/4] platform/x86: asus-wireless: Register ACPI notify handler directly Rafael J. Wysocki
2026-02-28 17:02 ` Denis Benato
2026-02-28 15:12 ` [PATCH v1 4/4] platform/x86: asus-wireless: Convert ACPI driver to a platform one Rafael J. Wysocki
2026-02-28 17:02 ` 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=f55a6814-862e-46a9-91ca-f7bbf6921dde@linux.dev \
--to=denis.benato@linux.dev \
--cc=corentin.chary@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jprvita@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke@ljones.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@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