]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/bus.c
ACPI: EC: Switch from boot_ec as soon as we find its desc in DSDT.
[linux-2.6-omap-h63xx.git] / drivers / acpi / bus.c
index 0c93cd400ddb02254a268c3af5837a318ab65a4e..6b2658c9624245c7de284623058b4312bb96ff0e 100644 (file)
@@ -103,7 +103,9 @@ int acpi_bus_get_status(struct acpi_device *device)
        else if (device->parent)
                device->status = device->parent->status;
        else
-               STRUCT_TO_INT(device->status) = 0x0F;
+               STRUCT_TO_INT(device->status) =
+                   ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
+                   ACPI_STA_DEVICE_UI      | ACPI_STA_DEVICE_FUNCTIONING;
 
        if (device->status.functional && !device->status.present) {
                printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: "
@@ -147,7 +149,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
                        *state = ACPI_STATE_D0;
        } else {
                /*
-                * Get the device's power state either directly (via _PSC) or 
+                * Get the device's power state either directly (via _PSC) or
                 * indirectly (via power resources).
                 */
                if (device->power.flags.explicit_get) {
@@ -290,6 +292,10 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
        if (!device)
                return -EINVAL;
 
+       if (acpi_bus_generate_genetlink_event(device, type, data))
+               printk(KERN_WARNING PREFIX
+                       "Failed to generate an ACPI event via genetlink!\n");
+
        /* drop event on the floor if no one's listening */
        if (!event_is_open)
                return 0;
@@ -461,7 +467,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
                                  "Received BUS CHECK notification for device [%s]\n",
                                  device->pnp.bus_id));
                result = acpi_bus_check_scope(device);
-               /* 
+               /*
                 * TBD: We'll need to outsource certain events to non-ACPI
                 *      drivers via the device manager (device.c).
                 */
@@ -472,7 +478,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
                                  "Received DEVICE CHECK notification for device [%s]\n",
                                  device->pnp.bus_id));
                result = acpi_bus_check_device(device, NULL);
-               /* 
+               /*
                 * TBD: We'll need to outsource certain events to non-ACPI
                 *      drivers via the device manager (device.c).
                 */
@@ -542,7 +548,7 @@ static int __init acpi_bus_init_irq(void)
        char *message = NULL;
 
 
-       /* 
+       /*
         * Let the system know what interrupt model we are using by
         * evaluating the \_PIC object, if exists.
         */
@@ -683,7 +689,7 @@ static int __init acpi_bus_init(void)
         * the EC device is found in the namespace (i.e. before acpi_initialize_objects()
         * is called).
         *
-        * This is accomplished by looking for the ECDT table, and getting 
+        * This is accomplished by looking for the ECDT table, and getting
         * the EC parameters out of that.
         */
        status = acpi_ec_ecdt_probe();
@@ -698,6 +704,9 @@ static int __init acpi_bus_init(void)
 
        printk(KERN_INFO PREFIX "Interpreter enabled\n");
 
+       /* Initialize sleep structures */
+       acpi_sleep_init();
+
        /*
         * Get the system interrupt model and evaluate \_PIC.
         */