While a given ACPI device may have 0-N compatibility IDs, in practice most
seem to have 0 or 1. If one is present, emit it as part of the PNP info
string associated with a device. This could enable MODULE_PNP_INFO-based
automatic kldload for ACPI drivers associated with a given _CID (but without
a good _HID or _UID identifier).
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I think just doing the first one is probably fine. You could also do a comma-separated list? A comma separated list would require using
something like strlcat perhaps, but that wouldn't be the worst thing.
Devmatch isn't set up to match on comma-separated values, so I don't think there's much use in adding that at this time. I.e., if a device provided several CIDs, PNP info of "... _CID=foo,bar,baz", a MODULE_PNP_INFO("Z:_CID") match with a table including "foo", "bar", "baz" wouldn't match; only a table entry of "foo,bar,baz" would. Support for comma-separated values could definitely be added, but I would lean towards not doing so at this time.
(I'm also not to worried about just the first one — it seems like most devices have 0 or 1 _CIDs. When we find a device that needs matching on a 2nd _CID, we can implement that support.)
I'll echo what jhb said...
And note that devmatch doesn't know CID and hid are the same namespace for auto loading. I'm unsure how to communicate that to devmatch.... that shouldn't block this commit though