James Carlson wrote: > Kerry Shu writes: >> James Carlson wrote: >>> Kerry Shu writes: >>>> Darren J Moffat wrote: >>>>> How does acpi_drv determine which vendor specific module to load ? What >>>> acpi_drv will try to load all known vendor specific modules. Once one >>>> module is loaded successfully, it's believed a vendor specific module >>>> is found and function. >>> How exactly does the system know which module works on a given system? >> If the corresponding ACPI method is found in _init of the vendor >> specific module, then _init will return SUCCESS and we know the >> module works. > > Do you read the misc/ directories appearing in the kernel's module > search path and load every misc module whose name matches acpi_*, and > expect at most one of them to return 0 from _init()?
My current implementation is to define a static array with known vendor specific modules name(currently only acpi_toshiba) in acpi_drv. Yes, it expects at most one of them to return 0 from _init(). > >>> Are these modules expected to test for platform compatibility by >>> probing around in the module's _init(9E) function? >> Yes. And per my understanding, the ACPI method string should be unique >> per vendor. > > OK. I would think that a safer way to do this would be to have a new > registry in /etc (acpi_modules?) that maps from method string to > module name to be loaded. > > But as long as you've tested your search method, and it doesn't cause > undue hardship, and this is the _only_ thing that's likely to be using > it, I guess I don't have a strong feeling about this. > Got it. If I do find conflicts in our testing, I'll take your suggestion. Thanks! Btw, for Toshiba, we are searching for "TOS6208" and "TOS1900" in ACPI namespace. Thanks, Kerry