On Tuesday, April 08, 2014 08:32:46 AM Duncan Laurie wrote:
If we do go the route of having lots of mainboard handlers I think we should keep the method names consistent with the ACPI spec and use a mainboard namespace to separate them. Conditional references are already a headache in ASL and I think relying on the preprocessor would make things worse.
Scope (_SB.MB) // Lid open Method (LIDO) { ... } // Lid closed Method (LIDC) { ... } // Increase brightness Method (BRTI) { ... } }
Duncan, this is genius. It simplifies the ASL quite a bit, even if some of said methods are stubs. Looking at some code actual code [1][2], this method is very clean and straightforward. I vote for this approach.
Alex
[1] http://review.coreboot.org/#/c/5515/ [2] http://review.coreboot.org/#/c/5517/1/src/mainboard/hp/pavilion_m6_1035dx/ac...