From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Mattia Dongili <malattia@linux.it>
Cc: Norbert Preining <preining@logic.at>,
Matthias Welwarsky <matze@welwarsky.de>,
linux-acpi@vger.kernel.org
Subject: [PATCH 2/5] sony-laptop: Enable EC on newer hardware
Date: Tue, 24 Mar 2009 00:48:17 +0000 [thread overview]
Message-ID: <20090324004817.GB2252@srcf.ucam.org> (raw)
In-Reply-To: <20090324004741.GA2252@srcf.ucam.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 <mjg@redhat.com>
---
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");
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2009-03-24 0:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 0:47 [PATCH 1/5] sony-laptop: Add support for new Sony platform API Matthew Garrett
2009-03-24 0:48 ` Matthew Garrett [this message]
2009-03-24 0:48 ` [PATCH 3/5] sony-laptop: Add support for extra keyboard events Matthew Garrett
2009-03-24 0:49 ` [PATCH 4/5] sony-laptop: Add rfkill support on new models Matthew Garrett
2009-03-24 0:50 ` [PATCH 5/5] sony-laptop: Add support for extended hotkeys Matthew Garrett
2009-03-24 8:15 ` Mattia Dongili
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090324004817.GB2252@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=linux-acpi@vger.kernel.org \
--cc=malattia@linux.it \
--cc=matze@welwarsky.de \
--cc=preining@logic.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox