From patchwork Tue Mar 24 00:48:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 13865 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2O0lnbc017252 for ; Tue, 24 Mar 2009 00:48:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753624AbZCXAsZ (ORCPT ); Mon, 23 Mar 2009 20:48:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754138AbZCXAsZ (ORCPT ); Mon, 23 Mar 2009 20:48:25 -0400 Received: from cavan.codon.org.uk ([93.93.128.6]:49640 "EHLO vavatch.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753624AbZCXAsY (ORCPT ); Mon, 23 Mar 2009 20:48:24 -0400 Received: from mjg59 by vavatch.codon.org.uk with local (Exim 4.69) (envelope-from ) id 1LluoT-0000aj-ND; Tue, 24 Mar 2009 00:48:18 +0000 Date: Tue, 24 Mar 2009 00:48:17 +0000 From: Matthew Garrett To: Mattia Dongili Cc: Norbert Preining , Matthias Welwarsky , linux-acpi@vger.kernel.org Subject: [PATCH 2/5] sony-laptop: Enable EC on newer hardware Message-ID: <20090324004817.GB2252@srcf.ucam.org> References: <20090324004741.GA2252@srcf.ucam.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20090324004741.GA2252@srcf.ucam.org> User-Agent: Mutt/1.5.12-2006-07-14 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: mjg59@codon.org.uk X-SA-Exim-Scanned: No (on vavatch.codon.org.uk); SAEximRunCond expanded to false Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- drivers/platform/x86/sony-laptop.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index ebe7ea6..130f81a 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -947,6 +947,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"); @@ -1004,6 +1010,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");