diff options
author | Len Brown <len.brown@intel.com> | 2005-08-03 18:15:15 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-03 18:15:15 -0400 |
commit | 8066eff0a1a0703ad901dbe5646a47dbfc089ef2 (patch) | |
tree | 9d46f66ae3f1002073c317e10218a78775ff7e2d /drivers/acpi/ec.c | |
parent | 9a351e30d72d409ec62c83f380e330e0baa584b4 (diff) | |
parent | 79cda7d0e1c8629996242c036d6fe0466038d8ba (diff) | |
download | linux-8066eff0a1a0703ad901dbe5646a47dbfc089ef2.tar.gz linux-8066eff0a1a0703ad901dbe5646a47dbfc089ef2.tar.xz |
/home/lenb/src/to-linus branch 'acpi-2.6.12'
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2dadb7f63269..1ac5731d45e5 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -76,13 +76,14 @@ static int acpi_ec_remove (struct acpi_device *device, int type); static int acpi_ec_start (struct acpi_device *device); static int acpi_ec_stop (struct acpi_device *device, int type); static int acpi_ec_burst_add ( struct acpi_device *device); +static int acpi_ec_polling_add ( struct acpi_device *device); static struct acpi_driver acpi_ec_driver = { .name = ACPI_EC_DRIVER_NAME, .class = ACPI_EC_CLASS, .ids = ACPI_EC_HID, .ops = { - .add = acpi_ec_burst_add, + .add = acpi_ec_polling_add, .remove = acpi_ec_remove, .start = acpi_ec_start, .stop = acpi_ec_stop, @@ -164,7 +165,7 @@ static union acpi_ec *ec_ecdt; /* External interfaces use first EC only, so remember */ static struct acpi_device *first_ec; -static int acpi_ec_polling_mode; +static int acpi_ec_polling_mode = EC_POLLING; /* -------------------------------------------------------------------------- Transaction Management @@ -1710,11 +1711,24 @@ static int __init acpi_fake_ecdt_setup(char *str) acpi_fake_ecdt_enabled = 1; return 0; } + __setup("acpi_fake_ecdt", acpi_fake_ecdt_setup); static int __init acpi_ec_set_polling_mode(char *str) { - acpi_ec_polling_mode = EC_POLLING; - acpi_ec_driver.ops.add = acpi_ec_polling_add; + int burst; + + if (!get_option(&str, &burst)) + return 0; + + if (burst) { + acpi_ec_polling_mode = EC_BURST; + acpi_ec_driver.ops.add = acpi_ec_burst_add; + } else { + acpi_ec_polling_mode = EC_POLLING; + acpi_ec_driver.ops.add = acpi_ec_polling_add; + } + printk(KERN_INFO PREFIX "EC %s mode.\n", + burst ? "burst": "polling"); return 0; } -__setup("ec_polling", acpi_ec_set_polling_mode); +__setup("ec_burst=", acpi_ec_set_polling_mode); |