All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Gardner <tim.gardner@canonical.com>
To: Mattia Dongili <malattia@linux.it>, Matthew Garrett <mjg@redhat.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: [PATCH] Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.
Date: Tue, 12 Jul 2011 09:55:38 -0600	[thread overview]
Message-ID: <4E1C6E7A.3030705@canonical.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Ubuntu has been carrying this patch for a couple of years because I keep 
forgetting to upstream it. Does anyone think it still makes sense, or 
should setting WWAN power be done in user space ?

rtg
-- 
Tim Gardner tim.gardner@canonical.com

[-- Attachment #2: 0001-UBUNTU-Sony-laptop-Some-Sony-Vaia-laptops-do-not-ena.patch --]
[-- Type: text/x-patch, Size: 2284 bytes --]

From 87db59448467783076b7468a8f8ae3650d08d3a0 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Tue, 21 Apr 2009 11:09:10 -0600
Subject: [PATCH] Sony laptop: Some Sony Vaia laptops do not enable wwan power by default.

Bug: https://bugs.launchpad.net/bugs/364678

Added quirk to enable wwan power based on DMI information already present in the module.
It appears that Vaio's do not enable power to wwan from a cold boot.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 drivers/platform/x86/sony-laptop.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index bbd182e..02265fd 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1879,6 +1879,10 @@ struct sonypi_eventtypes {
 	struct sonypi_event	*events;
 };
 
+struct sony_pic_quirk_entry {
+	u8				set_wwan_power;
+};
+
 struct sony_pic_dev {
 	struct acpi_device		*acpi_dev;
 	struct sony_pic_irq		*cur_irq;
@@ -1889,6 +1893,7 @@ struct sony_pic_dev {
 	struct sonypi_eventtypes	*event_types;
 	int                             (*handle_irq)(const u8, const u8);
 	int				model;
+	struct sony_pic_quirk_entry	*quirks;
 	u16				evport_offset;
 	u8				camera_power;
 	u8				bluetooth_power;
@@ -3315,6 +3320,12 @@ static int sony_pic_add(struct acpi_device *device)
 	if (result)
 		goto err_remove_pf;
 
+	if (spic_dev.quirks && spic_dev.quirks->set_wwan_power) {
+		/*
+		 * Power isn't enabled by default.
+		 */
+		__sony_pic_set_wwanpower(1);
+	}
 	return 0;
 
 err_remove_pf:
@@ -3385,6 +3396,16 @@ static struct acpi_driver sony_pic_driver = {
 		},
 };
 
+static struct sony_pic_quirk_entry sony_pic_vaio_vgn = {
+	.set_wwan_power = 1,
+};
+
+static int dmi_matched(const struct dmi_system_id *dmi)
+{
+	spic_dev.quirks = dmi->driver_data;
+	return 0;
+}
+
 static struct dmi_system_id __initdata sonypi_dmi_table[] = {
 	{
 		.ident = "Sony Vaio",
@@ -3399,6 +3420,8 @@ static struct dmi_system_id __initdata sonypi_dmi_table[] = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
 			DMI_MATCH(DMI_PRODUCT_NAME, "VGN-"),
 		},
+		.callback = dmi_matched,
+		.driver_data = &sony_pic_vaio_vgn,
 	},
 	{ }
 };
-- 
1.7.0.4


             reply	other threads:[~2011-07-12 15:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 15:55 Tim Gardner [this message]
2011-07-12 16:01 ` [PATCH] Sony laptop: Some Sony Vaia laptops do not enable wwan power by default Matthew Garrett
2011-07-12 22:29   ` Mattia Dongili
  -- strict thread matches above, loose matches on Subject: below --
2009-04-22 18:53 Tim Gardner
2009-04-22 19:50 ` Matthew Garrett
2009-04-22 20:07   ` Tim Gardner
2009-04-22 20:11     ` Matthew Garrett
2009-04-23  8:50       ` Mattia Dongili
2009-04-23  9:04 ` Mattia Dongili
2009-04-23 16:41   ` Tim Gardner

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=4E1C6E7A.3030705@canonical.com \
    --to=tim.gardner@canonical.com \
    --cc=malattia@linux.it \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.