From nobody Fri Apr 10 00:56:46 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41AC03D75D6; Wed, 4 Mar 2026 18:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772649988; cv=none; b=oInynQqFkaUgNk6KzRiZoTh6M1kFFK86HtOq/RigoOkgyjH4hlxihoSqIZAwSIwJYii9Ukk4rP+RLRTAlLuVgQX6iYK8udY+3I94v4z0+K5WA+60DVEiS0ss8r12OanwloMJ1rqBh9/F898YU5GWak5xAB4SUPN6s/pngPP1xOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772649988; c=relaxed/simple; bh=YGG8+AxtNsMQqvO5KwS+v5uC9yN0OxHX/Xl+KOQeLsg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QaY3raahi6bagp5ySeM58VjrhiKw4Xxf/y0pHsRiypa1MiV93ZTYP0JP039NV/q2KojxnANNf6Ps+Iqf7EXq4eRqRFe6T2+iOEWA993+kSElR3lnwH2UaqyLqImEqjYAFm/822tVstLrUfYN2yvj54X5LWq3ApIc2NzfSPsw+Hw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EnFJS7Qk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EnFJS7Qk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A3E1C4CEF7; Wed, 4 Mar 2026 18:46:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772649987; bh=YGG8+AxtNsMQqvO5KwS+v5uC9yN0OxHX/Xl+KOQeLsg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EnFJS7Qk3CEXhfcuk2THOZEokRIH6JivC2u2xnRgSWe9ddC7SxPlU0ZGpEozuEEe2 N1k2Hnc4YXUbmanPNdJBhakmyGzRTe6Fjzrj0hNL+GCW+uMTAWZ0e3lSQG6DZ4Y5ua Mpcz5dkU0y1m2Chhj6mExpY46lDriiY+nVQbi63t4cWXX7t4+uVgw8cpV3xbAP+DHp zcA9c2UfXqXjzsBhTgS4VHAVKyJnewhQjSCATKgwG9c0FVHj2n6hP0uFjEVqmMQtKY F/U1SeDkHYZ3ZeVohE8r5QmvxA21/U+0Lo7Cv0w9AvQd4EES/yiP2ablg+eqQrasIu fbmB91OX/jIrA== From: "Rafael J. Wysocki" To: chrome-platform@lists.linux.dev Cc: LKML , Linux ACPI , Benson Leung , Tzung-Bi Shih , Enric Balletbo i Serra , Ravi Chandra Sadineni Subject: [PATCH v1 5/6] platform/chrome: wilco_ec: event: Register ACPI notify handler Date: Wed, 04 Mar 2026 19:45:12 +0100 Message-ID: <886338398.0ifERbkFSE@rafael.j.wysocki> Organization: Linux Kernel Development In-Reply-To: <2274474.Mh6RI2rZIc@rafael.j.wysocki> References: <2274474.Mh6RI2rZIc@rafael.j.wysocki> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "Rafael J. Wysocki" 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. Signed-off-by: Rafael J. Wysocki --- drivers/platform/chrome/wilco_ec/event.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/platform/chrome/wilco_ec/event.c b/drivers/platform/ch= rome/wilco_ec/event.c index 743cd4839bff..f4500dd05f93 100644 --- a/drivers/platform/chrome/wilco_ec/event.c +++ b/drivers/platform/chrome/wilco_ec/event.c @@ -253,14 +253,16 @@ static int enqueue_events(struct acpi_device *adev, c= onst u8 *buf, u32 length) =20 /** * event_device_notify() - Callback when EC generates an event over ACPI. - * @adev: The device that the event is coming from. + * @handle: ACPI handle of the device that the event is coming from. * @value: Value passed to Notify() in ACPI. + * @data: Notify handler data. * * This function will read the events from the device and enqueue them. */ -static void event_device_notify(struct acpi_device *adev, u32 value) +static void event_device_notify(acpi_handle handle, u32 value, void *data) { struct acpi_buffer event_buffer =3D { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_device *adev =3D data; union acpi_object *obj; acpi_status status; =20 @@ -489,8 +491,16 @@ static int event_device_add(struct acpi_device *adev) if (error) goto free_dev_data; =20 + /* Install an ACPI notify handler. */ + error =3D acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY, + event_device_notify, adev); + if (error) + goto free_cdev; + return 0; =20 +free_cdev: + cdev_device_del(&dev_data->cdev, &dev_data->dev); free_dev_data: hangup_device(dev_data); free_minor: @@ -502,6 +512,8 @@ static void event_device_remove(struct acpi_device *ade= v) { struct event_device_data *dev_data =3D adev->driver_data; =20 + acpi_dev_remove_notify_handler(adev, ACPI_DEVICE_NOTIFY, + event_device_notify); cdev_device_del(&dev_data->cdev, &dev_data->dev); ida_free(&event_ida, MINOR(dev_data->dev.devt)); hangup_device(dev_data); @@ -519,7 +531,6 @@ static struct acpi_driver event_driver =3D { .ids =3D event_acpi_ids, .ops =3D { .add =3D event_device_add, - .notify =3D event_device_notify, .remove =3D event_device_remove, }, }; --=20 2.51.0