• Rafael J. Wysocki's avatar
    ACPI / scan: Add a scan handler for PRP0001 · 7d284352
    Rafael J. Wysocki authored
    If the special PRP0001 device ID is present in the given device's list
    of ACPI/PNP IDs and the device has a valid "compatible" property in
    the _DSD, it should be enumerated using the default mechanism,
    unless some scan handlers match the IDs preceding PRP0001 in the
    device's list of ACPI/PNP IDs.  In addition to that, no scan handlers
    matching the IDs following PRP0001 in that list should be attached
    to the device.
    To make that happen, define a scan handler that will match PRP0001
    and trigger the default enumeration for the matching devices if the
    "compatible" property is present for them.
    Since that requires the check for platform_id and device->handler
    to be removed from acpi_default_enumeration(), move the fallback
    invocation of acpi_default_enumeration() to acpi_bus_attach()
    (after it's checked if there's a matching ACPI driver for the
    device), which is a better place to call it, and do the platform_id
    check in there too (device->handler is guaranteed to be unset at
    the point where the function is looking for a matching ACPI driver).
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
scan.c 67.8 KB