From patchwork Thu Mar 26 12:58:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattia Dongili X-Patchwork-Id: 14514 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 n2QCwTlF018718 for ; Thu, 26 Mar 2009 12:58:30 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551AbZCZM6a (ORCPT ); Thu, 26 Mar 2009 08:58:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754530AbZCZM63 (ORCPT ); Thu, 26 Mar 2009 08:58:29 -0400 Received: from static-220-247-10-204.b-man.svips.gol.ne.jp ([220.247.10.204]:53394 "EHLO smtp.kamineko.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753551AbZCZM62 (ORCPT ); Thu, 26 Mar 2009 08:58:28 -0400 Received: from tadamune.kamineko.org (unknown [192.168.1.21]) by smtp.kamineko.org (Postfix) with ESMTP id 2303911025; Thu, 26 Mar 2009 21:58:26 +0900 (JST) Received: by tadamune.kamineko.org (Postfix, from userid 1000) id 135E71312B; Thu, 26 Mar 2009 21:58:26 +0900 (JST) From: Mattia Dongili To: Len Brown Cc: linux-acpi@vger.kernel.org, Matthew Garrett , Matthew Garrett , Mattia Dongili Subject: [PATCH 02/14] sony-laptop: Enable EC on newer hardware Date: Thu, 26 Mar 2009 21:58:13 +0900 Message-Id: <1238072305-8085-3-git-send-email-malattia@linux.it> X-Mailer: git-send-email 1.6.2 In-Reply-To: <1238072305-8085-2-git-send-email-malattia@linux.it> References: <1238072305-8085-1-git-send-email-malattia@linux.it> <1238072305-8085-2-git-send-email-malattia@linux.it> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Matthew Garrett 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 Signed-off-by: Mattia Dongili --- 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 3c52ec9..04deed8 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -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");