Re: [V3 PATCH 1/2] ACPI / scan: Add support for ACPI _CLS device matching

From: Mika Westerberg
Date: Thu Feb 12 2015 - 05:52:11 EST


On Wed, Feb 11, 2015 at 10:35:25PM +0000, Suthikulpanit, Suravee wrote:
> >> Besides, how do you support modules with this? Or did I miss something?
> >
> >Good question.
>
> Ah. I didn¹t think about this part earlier.
>
> IIUC, the current ACPI driver would create modules.alias entry with format:
> acpi:<HID>:<CID>
>
> What do you think if we append the _CLS of the device using the following
> format:
> acpi:<HID>:<CID>:<CLS>
>
> In case of PCI_CLASS_STORAGE_SATA_AHCI, this would become:
> acpi:::0x10601

Note, that you can have multiple _CIDs, in other words it may look like:

acpi:<HID>:<CID0>:<CID1>:<CLS>

In which case I'm not sure how to match the class. Perhaps use something
else than ':' as a separator for class?

BTW, should we add class_mask as well (like PCI does) so that drivers
can match part of the class id?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/