Skip to content

Commit

Permalink
ACPI: EC: Don't init EC early if it has no _INI
Browse files Browse the repository at this point in the history
Option to init EC early inserted to handle #8598 ASUS problem,
introduced several others.

EC driver in this particular case has fake _INI method, not present on
other machines, which don't need or break from this workaround, so lets use
its presence as a flag for early init.

http://bugzilla.kernel.org/show_bug.cgi?id=9262
http://bugzilla.kernel.org/show_bug.cgi?id=8598
https://bugzilla.novell.com/show_bug.cgi?id=334806

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alexey Starikovskiy authored and Len Brown committed Nov 19, 2007
1 parent 2ffbb83 commit 5870a8c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,12 +881,20 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec->gpe = ecdt_ptr->gpe;
boot_ec->handle = ACPI_ROOT_OBJECT;
} else {
/* This workaround is needed only on some broken machines,
* which require early EC, but fail to provide ECDT */
acpi_handle x;
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
boot_ec, NULL);
/* Check that acpi_get_devices actually find something */
if (ACPI_FAILURE(status) || !boot_ec->handle)
goto error;
/* We really need to limit this workaround, the only ASUS,
* which needs it, has fake EC._INI method, so use it as flag.
*/
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
goto error;
}

ret = ec_install_handlers(boot_ec);
Expand Down

0 comments on commit 5870a8c

Please sign in to comment.