sony-laptop: Enable EC on newer hardware
authorMatthew Garrett <mjg59@srcf.ucam.org>
Thu, 26 Mar 2009 12:58:13 +0000 (21:58 +0900)
committerLen Brown <len.brown@intel.com>
Fri, 27 Mar 2009 16:17:56 +0000 (12:17 -0400)
The latest Vaios can execute certain codepaths in two ways - either using
system management mode or using pure ACPI methods. The latter is only used
if the OS has called the ECON method. Ensure that this is done where the
method is available.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/sony-laptop.c

index 3c52ec9548abe2498c8d781860b3ec0d826f352f..04deed826180b4efd175aef6aed2d0ef2a6a08b7 100644 (file)
@@ -948,6 +948,12 @@ static int sony_nc_resume(struct acpi_device *device)
                }
        }
 
+       if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON",
+                                        &handle))) {
+               if (acpi_callsetfunc(sony_nc_acpi_handle, "ECON", 1, NULL))
+                       dprintk("ECON Method failed\n");
+       }
+
        if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00",
                                         &handle))) {
                dprintk("Doing SNC setup\n");
@@ -1005,6 +1011,12 @@ static int sony_nc_add(struct acpi_device *device)
                        dprintk("_INI Method failed\n");
        }
 
+       if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "ECON",
+                                        &handle))) {
+               if (acpi_callsetfunc(sony_nc_acpi_handle, "ECON", 1, NULL))
+                       dprintk("ECON Method failed\n");
+       }
+
        if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle, "SN00",
                                         &handle))) {
                dprintk("Doing SNC setup\n");