From f69e256376e939e63029c8d8be8b97eaa206eec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Bi=C8=99oc?= Date: Mon, 20 May 2024 16:16:24 +0200 Subject: [PATCH] [ACPI] Register a device interface class with ACPI fans As the commit title says, the point of registering a device interface with ACPI fans is to receive incoming PnP notifications of incoming ACPI fan drivers so that the power manager can connect to them by creating a power device policies dedicated to them during power manager initialization. CORE-18969 --- drivers/bus/acpi/buspdo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/bus/acpi/buspdo.c b/drivers/bus/acpi/buspdo.c index e91d09fecf5..16eff2250bd 100644 --- a/drivers/bus/acpi/buspdo.c +++ b/drivers/bus/acpi/buspdo.c @@ -76,6 +76,14 @@ Bus_PDO_PnP ( NULL, &DeviceData->InterfaceName); } + else if (device->flags.hardware_id && + strstr(device->pnp.hardware_id, ACPI_FAN_HID)) + { + status = IoRegisterDeviceInterface(DeviceData->Common.Self, + &GUID_DEVICE_FAN, + NULL, + &DeviceData->InterfaceName); + } else if (device->flags.hardware_id && strstr(device->pnp.hardware_id, ACPI_BUTTON_HID_LID)) {