Skip to content

Commit 28a35ac

Browse files
committed
ACPI: PNP: Introduce list of known non-PNP devices
In some cases, PNP device IDs from acpi_pnp_device_ids[] are returned by _CID for devices for which matching platform drivers are present in the kernel and should be bound to them. However, the IDs coming from _CID cause the PNP scan handler to attach to those devices which prevents platform device objects from being created for them. Address this by introducing a list of known non-PNP device IDs into acpi_pnp.c such that if a device ID is there in that list, it cannot be attached to by the PNP scan handler and add the platform runtime update and telemetry device IDs to that list to start with. Reported-by: Chen Yu <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Zhang Yang <[email protected]>
1 parent 5dc4c99 commit 28a35ac

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/acpi/acpi_pnp.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,22 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
348348
return false;
349349
}
350350

351+
/*
352+
* If one of the device IDs below is present in the list of device IDs of a
353+
* given ACPI device object, the PNP scan handler will not attach to that
354+
* object, because there is a proper non-PNP driver in the kernel for the
355+
* device represented by it.
356+
*/
357+
static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
358+
{"INTC1080"},
359+
{"INTC1081"},
360+
{""},
361+
};
362+
351363
static int acpi_pnp_attach(struct acpi_device *adev,
352364
const struct acpi_device_id *id)
353365
{
354-
return 1;
366+
return !!acpi_match_device_ids(adev, acpi_nonpnp_device_ids);
355367
}
356368

357369
static struct acpi_scan_handler acpi_pnp_handler = {

0 commit comments

Comments
 (0)