public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* new fixes for sony-acpi
@ 2009-03-23 16:34 Norbert Preining
  2009-03-28  1:34 ` Len Brown
  0 siblings, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2009-03-23 16:34 UTC (permalink / raw)
  To: sony-vaio-z-series
  Cc: Matthew Garrett, Mattia Dongili, Matthias Welwarsky, linux-acpi

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

Hi Sony Vaio Z list,

after some discussion Matthew has provided a nice patch that makes the
Fn-F5 and Fn-F6 keys working, and also S1 and S2.

I have adapted the speed-stamina patch from Matthias.

The following patches are only interesting for people running 2.6.29-rc
kernels (afais)

So attached are two patches:
- sony-laptop-matthew-version5.patch
  latest version from Matthew with some keys creating events

- sony-laptop.c-speed-stamina-latest.patch
  patch to add speed-stamina switch based on the 0.7 module of Matthias

Thanks a lot to Matthew and Matthias for working on that.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HIGH LIMERIGG (n.)
The topmost tread of a staircase which disappears when you've climbing
the stairs in the darkness.
			--- Douglas Adams, The Meaning of Liff

[-- Attachment #2: sony-laptop-matthew-version5.patch --]
[-- Type: text/x-diff, Size: 12885 bytes --]

Ok, this one should cover it. Thanks for testing! S1 and S2 will just 
generate events that can be bound with your desktop environment or 
xbindkeys or something similar.

Mattia, how do you feel about this approach? If you're happy enough I 
can send this as a patchset.

diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 537959d..00ed914 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -64,6 +64,7 @@
 #include <asm/uaccess.h>
 #include <linux/sonypi.h>
 #include <linux/sony-laptop.h>
+#include <linux/rfkill.h>
 #ifdef CONFIG_SONYPI_COMPAT
 #include <linux/poll.h>
 #include <linux/miscdevice.h>
@@ -123,6 +124,11 @@ MODULE_PARM_DESC(minor,
 		 "default is -1 (automatic)");
 #endif
 
+static struct rfkill *sony_wifi_rfkill;
+static struct rfkill *sony_bluetooth_rfkill;
+static struct rfkill *sony_wwan_rfkill;
+static struct rfkill *sony_wimax_rfkill;
+
 /*********** Input Devices ***********/
 
 #define SONY_LAPTOP_BUF_SIZE	128
@@ -134,6 +140,7 @@ struct sony_laptop_input_s {
 	spinlock_t		fifo_lock;
 	struct workqueue_struct	*wq;
 };
+
 static struct sony_laptop_input_s sony_laptop_input = {
 	.users = ATOMIC_INIT(0),
 };
@@ -689,6 +696,31 @@ static int acpi_callsetfunc(acpi_handle handle, char *name, int value,
 	return -1;
 }
 
+static int sony_find_snc_handle(int handle)
+{
+	int i;
+	int result;
+
+	for (i=0x20; i<0x30; i++) {
+		acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
+		if (result == handle)
+			return i-0x20;
+	}
+
+	return -1;
+}
+
+static int sony_call_snc_handle(int handle, int argument, int *result)
+{
+	int offset = sony_find_snc_handle(handle);
+
+	if (offset < 0)
+		return -1;
+
+	return acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
+				result);
+}
+
 /*
  * sony_nc_values input/output validate functions
  */
@@ -809,33 +841,27 @@ struct sony_nc_event {
 	u8	event;
 };
 
-static struct sony_nc_event *sony_nc_events;
-
-/* Vaio C* --maybe also FE*, N* and AR* ?-- special init sequence
- * for Fn keys
- */
-static int sony_nc_C_enable(const struct dmi_system_id *id)
-{
-	int result = 0;
-
-	printk(KERN_NOTICE DRV_PFX "detected %s\n", id->ident);
-
-	sony_nc_events = id->driver_data;
-
-	if (acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0x4, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x2, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0x10, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x0, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN03", 0x2, &result) < 0
-			|| acpi_callsetfunc(sony_nc_acpi_handle, "SN07", 0x101, &result) < 0) {
-		printk(KERN_WARNING DRV_PFX "failed to initialize SNC, some "
-				"functionalities may be missing\n");
-		return 1;
-	}
-	return 0;
-}
+static struct sony_nc_event sony_90_events[] = {
+	{ 0x90, SONYPI_EVENT_PKEY_P1 },
+	{ 0x10, SONYPI_EVENT_ANYBUTTON_RELEASED },
+	{ 0x91, SONYPI_EVENT_PKEY_P1 },
+	{ 0x11, SONYPI_EVENT_ANYBUTTON_RELEASED },
+	{ 0x85, SONYPI_EVENT_FNKEY_F5 },
+	{ 0x05, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x86, SONYPI_EVENT_FNKEY_F6 },
+	{ 0x06, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x87, SONYPI_EVENT_FNKEY_F7 },
+	{ 0x07, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x89, SONYPI_EVENT_FNKEY_F9 },
+	{ 0x09, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x8a, SONYPI_EVENT_FNKEY_F10 },
+	{ 0x0a, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0x8C, SONYPI_EVENT_FNKEY_F12 },
+	{ 0x0C, SONYPI_EVENT_FNKEY_RELEASED },
+	{ 0, 0 },
+};
 
-static struct sony_nc_event sony_C_events[] = {
+static struct sony_nc_event sony_92_events[] = {
 	{ 0x81, SONYPI_EVENT_FNKEY_F1 },
 	{ 0x01, SONYPI_EVENT_FNKEY_RELEASED },
 	{ 0x85, SONYPI_EVENT_FNKEY_F5 },
@@ -851,57 +877,18 @@ static struct sony_nc_event sony_C_events[] = {
 	{ 0, 0 },
 };
 
-/* SNC-only model map */
-static const struct dmi_system_id sony_nc_ids[] = {
-		{
-			.ident = "Sony Vaio FE Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FE"),
-			},
-		},
-		{
-			.ident = "Sony Vaio FZ Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ"),
-			},
-		},
-		{
-			.ident = "Sony Vaio C Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-C"),
-			},
-		},
-		{
-			.ident = "Sony Vaio N Series",
-			.callback = sony_nc_C_enable,
-			.driver_data = sony_C_events,
-			.matches = {
-				DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-				DMI_MATCH(DMI_PRODUCT_NAME, "VGN-N"),
-			},
-		},
-		{ }
-};
-
 /*
  * ACPI callbacks
  */
 static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
 {
-	struct sony_nc_event *evmap;
 	u32 ev = event;
 	int result;
 
-	if (ev == 0x92) {
+	if (ev == 0x90 || ev == 0x92) {
+		struct sony_nc_event *events;
+		int origev = ev;
+		
 		/* read the key pressed from EC.GECR
 		 * A call to SN07 with 0x0202 will do it as well respecting
 		 * the current protocol on different OSes
@@ -913,20 +900,29 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
 		 * TODO: we may want to do the same for the older GHKE -need
 		 *       dmi list- so this snippet may become one more callback.
 		 */
-		if (acpi_callsetfunc(handle, "SN07", 0x0202, &result) < 0)
+		if (sony_call_snc_handle(0x100, 0x200, &result))
 			dprintk("sony_acpi_notify, unable to decode event 0x%.2x\n", ev);
 		else
 			ev = result & 0xFF;
-	}
 
-	if (sony_nc_events)
-		for (evmap = sony_nc_events; evmap->event; evmap++) {
-			if (evmap->data == ev) {
-				ev = evmap->event;
+		if (origev == 0x90)
+			events = sony_90_events;
+		else
+			events = sony_92_events;
+
+		while (events->event) {
+			if (events->data == ev) {
+				ev = events->event;
 				break;
 			}
+			events++;
 		}
 
+		if (!events->data)
+			printk(KERN_INFO DRV_PFX "Unknown event: %x %x\n",
+			       origev, ev);
+	}
+
 	dprintk("sony_acpi_notify, event: 0x%.2x\n", ev);
 	sony_laptop_report_input_event(ev);
 	acpi_bus_generate_proc_event(sony_nc_acpi_device, 1, ev);
@@ -953,9 +949,24 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
 /*
  * ACPI device
  */
+static int sony_nc_function_setup(struct acpi_device *device) {
+	int result;
+
+	/* Enable all events */
+	acpi_callsetfunc(sony_nc_acpi_handle, "SN02", 0xffff, &result);
+
+	/* Setup hotkeys */
+	sony_call_snc_handle(0x0100, 0, &result);
+	sony_call_snc_handle(0x0101, 0, &result);
+	sony_call_snc_handle(0x0102, 0x100, &result);
+
+	return 0;
+}
+
 static int sony_nc_resume(struct acpi_device *device)
 {
 	struct sony_nc_value *item;
+	acpi_handle handle;
 
 	for (item = sony_nc_values; item->name; item++) {
 		int ret;
@@ -970,13 +981,156 @@ 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");
+		sony_nc_function_setup(device);
+	}
+
 	/* set the last requested brightness level */
 	if (sony_backlight_device &&
 			!sony_backlight_update_status(sony_backlight_device))
 		printk(KERN_WARNING DRV_PFX "unable to restore brightness level\n");
 
-	/* re-initialize models with specific requirements */
-	dmi_check_system(sony_nc_ids);
+	return 0;
+}
+
+static void sony_nc_rfkill_cleanup(void)
+{
+	if (sony_wifi_rfkill)
+		rfkill_unregister(sony_wifi_rfkill);
+	if (sony_bluetooth_rfkill)
+		rfkill_unregister(sony_bluetooth_rfkill);
+	if (sony_wwan_rfkill)
+		rfkill_unregister(sony_wwan_rfkill);
+	if (sony_wimax_rfkill)
+		rfkill_unregister(sony_wimax_rfkill);
+}
+
+static int sony_nc_rfkill_get(void *data, enum rfkill_state *state)
+{
+	int result;
+
+	sony_call_snc_handle(0x124, (long) data, &result);
+	if (result & 0xf)
+		*state = RFKILL_STATE_UNBLOCKED;
+	else
+		*state = RFKILL_STATE_SOFT_BLOCKED;
+	return 0;
+}
+
+static int sony_nc_rfkill_set(void *data, enum rfkill_state state)
+{
+	int result;
+	int argument = (long) data + 1;
+
+	if (state == RFKILL_STATE_UNBLOCKED)
+		argument |= 0xff0000;
+
+	return sony_call_snc_handle(0x124, argument, &result);
+}
+
+static int sony_nc_setup_wifi_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+
+	sony_wifi_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WLAN);
+	if (!sony_wifi_rfkill)
+		return -1;
+	sony_wifi_rfkill->name = "sony-wifi";
+	sony_wifi_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wifi_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wifi_rfkill->user_claim_unsupported = 1;
+	sony_wifi_rfkill->data = (void *)0x300;
+	err = rfkill_register(sony_wifi_rfkill);
+	if (err)
+		rfkill_free(sony_wifi_rfkill);
+	return err;
+}
+
+static int sony_nc_setup_bluetooth_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+
+	sony_bluetooth_rfkill = rfkill_allocate(&device->dev,
+						RFKILL_TYPE_BLUETOOTH);
+       if (!sony_bluetooth_rfkill)
+	       return -1;
+       sony_bluetooth_rfkill->name = "sony-bluetooth";
+       sony_bluetooth_rfkill->toggle_radio = sony_nc_rfkill_set;
+       sony_bluetooth_rfkill->get_state = sony_nc_rfkill_get;
+       sony_bluetooth_rfkill->user_claim_unsupported = 1;
+       sony_bluetooth_rfkill->data = (void *)0x500;
+       err = rfkill_register(sony_bluetooth_rfkill);
+       if (err)
+	       rfkill_free(sony_bluetooth_rfkill);
+       return err;
+}
+
+static int sony_nc_setup_wwan_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+
+	sony_wwan_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WWAN);
+	if (!sony_wwan_rfkill)
+		return -1;
+	sony_wwan_rfkill->name = "sony-wwan";
+	sony_wwan_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wwan_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wwan_rfkill->user_claim_unsupported = 1;
+	sony_wwan_rfkill->data = (void *)0x700;
+	err = rfkill_register(sony_wwan_rfkill);
+	if (err)
+		rfkill_free(sony_wwan_rfkill);
+	return err;
+}
+
+static int sony_nc_setup_wimax_rfkill(struct acpi_device *device)
+{
+	int err = 0;
+
+	sony_wimax_rfkill = rfkill_allocate(&device->dev, RFKILL_TYPE_WIMAX);
+	if (!sony_wimax_rfkill)
+		return -1;
+	sony_wimax_rfkill->name = "sony-wimax";
+	sony_wimax_rfkill->toggle_radio = sony_nc_rfkill_set;
+	sony_wimax_rfkill->get_state = sony_nc_rfkill_get;
+	sony_wimax_rfkill->user_claim_unsupported = 1;
+	sony_wimax_rfkill->data = (void *)0x900;
+	err = rfkill_register(sony_wimax_rfkill);
+	if (err)
+		rfkill_free(sony_wimax_rfkill);
+	return err;
+}
+
+static int sony_nc_rfkill_setup(struct acpi_device *device)
+{
+	int result, ret;
+
+	if (sony_find_snc_handle(0x124) == -1)
+		return -1;
+
+	ret = sony_call_snc_handle(0x124, 0xb00, &result);
+	if (ret) {
+		printk(KERN_INFO DRV_PFX
+		       "Unable to enumerate rfkill devices: %x\n", ret);
+		return ret;
+	}
+
+	if (result & 0x1)
+		sony_nc_setup_wifi_rfkill(device);
+	if (result & 0x2)
+		sony_nc_setup_bluetooth_rfkill(device);
+	if (result & 0x1c)
+		sony_nc_setup_wwan_rfkill(device);
+	if (result & 0x20)
+		sony_nc_setup_wimax_rfkill(device);
 
 	return 0;
 }
@@ -1024,6 +1178,19 @@ 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");
+		sony_nc_function_setup(device);
+		sony_nc_rfkill_setup(device);
+	}
+
 	/* setup input devices and helper fifo */
 	result = sony_laptop_setup_input(device);
 	if (result) {
@@ -1063,9 +1230,6 @@ static int sony_nc_add(struct acpi_device *device)
 
 	}
 
-	/* initialize models with specific requirements */
-	dmi_check_system(sony_nc_ids);
-
 	result = sony_pf_add();
 	if (result)
 		goto outbacklight;
@@ -1131,6 +1295,7 @@ static int sony_nc_add(struct acpi_device *device)
 	sony_laptop_remove_input();
 
       outwalk:
+	sony_nc_rfkill_cleanup();
 	return result;
 }
 
@@ -1156,6 +1321,7 @@ static int sony_nc_remove(struct acpi_device *device, int type)
 
 	sony_pf_remove();
 	sony_laptop_remove_input();
+	sony_nc_rfkill_cleanup();
 	dprintk(SONY_NC_DRIVER_NAME " removed.\n");
 
 	return 0;


-- 
Matthew Garrett | mjg59@srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #3: sony-laptop.c-speed-stamina-latest.patch --]
[-- Type: text/x-diff, Size: 4802 bytes --]

--- sony-laptop.c-2.6.29-rc8-matthew5	2009-03-23 17:31:19.000000000 +0100
+++ sony-laptop.c	2009-03-23 17:32:29.000000000 +0100
@@ -3,6 +3,7 @@
  *
  * Copyright (C) 2004-2005 Stelian Pop <stelian@popies.net>
  * Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
+ * Copyright (C) 2009 Matthias Welwarsky <matze@welwarsky.de>
  *
  * Parts of this driver inspired from asus_acpi.c and ibm_acpi.c
  * which are copyrighted by their respective authors.
@@ -115,6 +116,11 @@
 		 "set this to 1 to enable Motion Eye camera controls "
 		 "(only use it if you have a C1VE or C1VN model)");
 
+static int speed_stamina;
+module_param(speed_stamina, int, 0444);
+MODULE_PARM_DESC(speed_stamina,
+                 "Set this to 1 to enable SPEED mode on module load (EXPERIMENTAL)");
+
 #ifdef CONFIG_SONYPI_COMPAT
 static int minor = -1;
 module_param(minor, int, 0);
@@ -475,9 +481,161 @@
 }
 
 /*********** Platform Device ***********/
+static int sony_ovga_dsm(int func, int arg)
+{
+        static char *path = "\\_SB.PCI0.OVGA._DSM";
+	static char muid[] = {
+		/*00*/	0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,		/* MUID */
+		/*08*/	0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
+	};
+
+	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
+	struct acpi_object_list input;
+	union acpi_object params[4];
+	int result;
+
+	input.count = 4;
+	input.pointer = params;
+	params[0].type = ACPI_TYPE_BUFFER;
+	params[0].buffer.length = sizeof(muid);
+	params[0].buffer.pointer = (char*)muid;
+	params[1].type = ACPI_TYPE_INTEGER;
+	params[1].integer.value = 0x00000102;
+	params[2].type = ACPI_TYPE_INTEGER;
+	params[2].integer.value = func;
+	params[3].type = ACPI_TYPE_INTEGER;
+	params[3].integer.value = arg;
+
+	result = acpi_evaluate_object(NULL, (char*)path, &input, &output);
+	if (result) {
+		printk("%s failed: %d\n", path, result);
+		return -1;
+	}
+
+#ifdef DEBUG
+	{
+		union acpi_object *obj = (union acpi_object*)output.pointer;
+		if (obj->type == ACPI_TYPE_PACKAGE) {
+			int i;
+			printk("returned package sized %d\n", obj->package.count);
+			for (i = 0; i < obj->package.count; i++)
+				printk("%d %08x\n", i, obj->package.elements[i].integer.value);
+		} else
+		if (obj->type == ACPI_TYPE_INTEGER) {
+			printk("returned integer %08X\n", obj->integer.value);
+		} else
+		if (obj->type == ACPI_TYPE_BUFFER) {
+			int i;
+			printk("returned buffer sized %d\n", obj->buffer.length);
+			for (i = 0; i < obj->buffer.length; i++)
+				printk("%d %02x\n", i, obj->buffer.pointer[i]);
+		}
+	}
+#endif
+	kfree(output.pointer);
+	return 0;
+}
+
+static int sony_led_stamina(void)
+{
+	return sony_ovga_dsm(2, 0x11);
+}
+
+static int sony_led_speed(void)
+{
+	return sony_ovga_dsm(2, 0x12);
+}
+
+#ifdef DEBUG
+static int sony_led_off(void)
+{
+	return sony_ovga_dsm(2, 0x13);
+}
+
+static int sony_dgpu_sta(void)
+{
+	return sony_ovga_dsm(3, 0x00);
+}
+#endif
+
+static int sony_dgpu_off(void)
+{
+	return sony_ovga_dsm(3, 0x02);
+}
+
+static int sony_dgpu_on(void)
+{
+	return sony_ovga_dsm(3, 0x01);
+}
+
+static ssize_t sony_pf_store_speed_stamina(struct device *dev,
+			       struct device_attribute *attr,
+			       const char *buffer, size_t count)
+{
+	if (!strncmp(buffer, "speed", strlen("speed"))) {
+		sony_dgpu_on();
+		sony_led_speed();
+		speed_stamina = 1;
+	} else
+	if (!strncmp(buffer, "stamina", strlen("stamina"))) {
+		sony_dgpu_off();
+		sony_led_stamina();
+		speed_stamina = 0;
+	} else
+		return -EINVAL;
+
+	return count;
+}
+
+static ssize_t sony_pf_show_speed_stamina(struct device *dev,
+		struct device_attribute *attr, char *buffer)
+{
+	return snprintf(buffer, PAGE_SIZE, "%s\n", speed_stamina ? "speed":"stamina");
+}
+
+static struct device_attribute sony_pf_speed_stamina_attr =
+	__ATTR(speed_stamina, S_IWUSR|S_IRUGO,
+		sony_pf_show_speed_stamina, sony_pf_store_speed_stamina);
+
+static int sony_pf_probe(struct platform_device *pdev)
+{
+	int result;
+
+	result = device_create_file(&pdev->dev, &sony_pf_speed_stamina_attr);
+	if (result)
+		printk(KERN_DEBUG "sony_pf_probe: failed to add speed/stamina switch\n");
+
+	/* initialize default, look at module param speed_stamina */
+	if (speed_stamina == 1) {
+		sony_dgpu_on();
+		sony_led_speed();
+	} else {
+		sony_dgpu_off();
+		sony_led_stamina();
+	}
+
+	return 0;
+}
+
+static int sony_pf_resume(struct platform_device *pdev)
+{
+	/* on resume, restore previous state */
+	if (speed_stamina == 1) {
+		sony_dgpu_on();
+		sony_led_speed();
+	} else {
+		sony_dgpu_off();
+		sony_led_stamina();
+	}
+	return 0;
+}
 
 static atomic_t sony_pf_users = ATOMIC_INIT(0);
 static struct platform_driver sony_pf_driver = {
+	.probe  = sony_pf_probe,
+#ifdef CONFIG_PM
+	.resume_early = sony_pf_resume,
+#endif
 	.driver = {
 		   .name = "sony-laptop",
 		   .owner = THIS_MODULE,

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-23 16:34 new fixes for sony-acpi Norbert Preining
@ 2009-03-28  1:34 ` Len Brown
  2009-03-28  1:38   ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Len Brown @ 2009-03-28  1:34 UTC (permalink / raw)
  To: Norbert Preining
  Cc: sony-vaio-z-series, Matthew Garrett, Mattia Dongili,
	Matthias Welwarsky, linux-acpi



--
Len Brown, Intel Open Source Technology Center

On Mon, 23 Mar 2009, Norbert Preining wrote:

> Hi Sony Vaio Z list,
> 
> after some discussion Matthew has provided a nice patch that makes the
> Fn-F5 and Fn-F6 keys working, and also S1 and S2.
> 
> I have adapted the speed-stamina patch from Matthias.
> 
> The following patches are only interesting for people running 2.6.29-rc
> kernels (afais)
> 
> So attached are two patches:
> - sony-laptop-matthew-version5.patch
>   latest version from Matthew with some keys creating events
> 
> - sony-laptop.c-speed-stamina-latest.patch
>   patch to add speed-stamina switch based on the 0.7 module of Matthias
> 
> Thanks a lot to Matthew and Matthias for working on that.

I assume that Matthew's rfkill patch later sent to me via Mattia replaces
what was in this message.

What about the speed/stamina stuff -- is anybody testing it?

thanks,
-Len


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  1:34 ` Len Brown
@ 2009-03-28  1:38   ` Matthew Garrett
  2009-03-28  8:33     ` Norbert Preining
  2009-03-28  8:41     ` Matthias Welwarsky
  0 siblings, 2 replies; 18+ messages in thread
From: Matthew Garrett @ 2009-03-28  1:38 UTC (permalink / raw)
  To: Len Brown
  Cc: Norbert Preining, sony-vaio-z-series, Mattia Dongili,
	Matthias Welwarsky, linux-acpi

On Fri, Mar 27, 2009 at 09:34:23PM -0400, Len Brown wrote:

> I assume that Matthew's rfkill patch later sent to me via Mattia replaces
> what was in this message.

Yes.

> What about the speed/stamina stuff -- is anybody testing it?

The speed/stamina stuff isn't Sony specific. I'm working on an external 
module to handle that.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  1:38   ` Matthew Garrett
@ 2009-03-28  8:33     ` Norbert Preining
  2009-03-28 12:00       ` Matthew Garrett
  2009-03-28  8:41     ` Matthias Welwarsky
  1 sibling, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2009-03-28  8:33 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Sa, 28 Mär 2009, Matthew Garrett wrote:
> > What about the speed/stamina stuff -- is anybody testing it?
> 
> The speed/stamina stuff isn't Sony specific. I'm working on an external 
> module to handle that.

I am testing that, but we are far from having a working thingy,
currently on the sony z11 the nvidia (the second, the speed card) is not
working without acpi/dsdt tricks (but Matthias might correct me).

Matthew, if you have something to test I am, as usual open for any
tests, but I am aways 2 weeks. In these 2 weeks I hope I get back my
z11, it broke the SECOND time in 6 months, harddisc bad sector errors.
I am wondering if SATA link management, laptop tools, etc etc could
interfere with that.

Just a warning for all the Sony guys with Z11, make decent backups,
waiting for ddrescue is a pain. 2 times in 6 month sudden death of hard
disk.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
The main reception foyer was almost empty but Ford
nevertheless weaved his way through it.
                 --- Ford making his way out of Milliways whilst under the
                 --- influence of enough alchol to make a rhino sing.
                 --- Douglas Adams, The Hitchhikers Guide to the Galaxy
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  1:38   ` Matthew Garrett
  2009-03-28  8:33     ` Norbert Preining
@ 2009-03-28  8:41     ` Matthias Welwarsky
  2009-03-28 12:11       ` Albert Vilella
  2009-03-28 12:22       ` Matthew Garrett
  1 sibling, 2 replies; 18+ messages in thread
From: Matthias Welwarsky @ 2009-03-28  8:41 UTC (permalink / raw)
  To: linux-acpi

On Saturday 28 March 2009 02:38:32 Matthew Garrett wrote:
> On Fri, Mar 27, 2009 at 09:34:23PM -0400, Len Brown wrote:
> > I assume that Matthew's rfkill patch later sent to me via Mattia replaces
> > what was in this message.
>
> Yes.
>
> > What about the speed/stamina stuff -- is anybody testing it?

The current code only powers down the Nvidia graphics adapter, it seems to 
work well for a number of people. However, its not really useful. For example, 
it doesn't allow to use the Nvidia card as the primary display adapter. 
Apparently it takes more then just calling the DSDT methods to enable the 
power supply, the card likely needs some PCI treatment as well so that its 
fully functional after switching it on. 

> The speed/stamina stuff isn't Sony specific. I'm working on an external
> module to handle that.

Looking at the somewhat twisted way the Sony DSDT code handles power 
management for the graphics adapters, I have my doubts that there will be a 
generic way. Of course a framework like for the rf kill switch could be 
useful, but the vendor and model specific code would end up in sony-laptop 
anyway.

regards,
matthias

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  8:33     ` Norbert Preining
@ 2009-03-28 12:00       ` Matthew Garrett
  2009-03-31 15:20         ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Matthew Garrett @ 2009-03-28 12:00 UTC (permalink / raw)
  To: Norbert Preining
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Sat, Mar 28, 2009 at 09:33:15AM +0100, Norbert Preining wrote:

> I am testing that, but we are far from having a working thingy,
> currently on the sony z11 the nvidia (the second, the speed card) is not
> working without acpi/dsdt tricks (but Matthias might correct me).

The short version is that you're not going to get support for the 
external chip until nouveau is able to cold boot it.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  8:41     ` Matthias Welwarsky
@ 2009-03-28 12:11       ` Albert Vilella
  2009-03-28 12:19         ` Matthew Garrett
  2009-03-28 12:22       ` Matthew Garrett
  1 sibling, 1 reply; 18+ messages in thread
From: Albert Vilella @ 2009-03-28 12:11 UTC (permalink / raw)
  To: Matthias Welwarsky, mjg59; +Cc: linux-acpi

>> > What about the speed/stamina stuff -- is anybody testing it?
>> The speed/stamina stuff isn't Sony specific. I'm working on an external
>> module to handle that.
>
> Looking at the somewhat twisted way the Sony DSDT code handles power
> management for the graphics adapters, I have my doubts that there will be a
> generic way. Of course a framework like for the rf kill switch could be
> useful, but the vendor and model specific code would end up in sony-laptop
> anyway.

Hi Matthias and Matthew,

I am right in thinking that reading the DSDT tables for hybrid
graphics laptops is sufficient to infer their workings?
I've been compiling a list of hybrid graphics laptops and been asking
people to provide their DSDT tables
in this bug report:
https://bugs.launchpad.net/bugs/312756

So far, I've identified 12 laptops, and we've got DSDT tables for 4 of them:
http://linux-hybrid-graphics.blogspot.com/2009/03/412-linux-dsdt-tables-for-laptops-with.html

Please let me know if you think we should be asking any other info,

Cheers,

    Albert.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28 12:11       ` Albert Vilella
@ 2009-03-28 12:19         ` Matthew Garrett
  0 siblings, 0 replies; 18+ messages in thread
From: Matthew Garrett @ 2009-03-28 12:19 UTC (permalink / raw)
  To: Albert Vilella; +Cc: Matthias Welwarsky, linux-acpi

On Sat, Mar 28, 2009 at 12:11:51PM +0000, Albert Vilella wrote:

> I am right in thinking that reading the DSDT tables for hybrid
> graphics laptops is sufficient to infer their workings?

Yes, though nvidia and AMD use quite different approaches to this. The 
nvidia chips all appear to have a _DSM with the same UUID.

> I've been compiling a list of hybrid graphics laptops and been asking
> people to provide their DSDT tables
> in this bug report:
> https://bugs.launchpad.net/bugs/312756

Ah, convenient, thanks! I'd only had the Thinkpad DSDT to look at so 
far, so this gives me a chance to work out if there's any 
standardisation of the AMD approach.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28  8:41     ` Matthias Welwarsky
  2009-03-28 12:11       ` Albert Vilella
@ 2009-03-28 12:22       ` Matthew Garrett
  2009-03-28 14:19         ` Matthias Welwarsky
  1 sibling, 1 reply; 18+ messages in thread
From: Matthew Garrett @ 2009-03-28 12:22 UTC (permalink / raw)
  To: Matthias Welwarsky; +Cc: linux-acpi

On Sat, Mar 28, 2009 at 09:41:12AM +0100, Matthias Welwarsky wrote:

> Looking at the somewhat twisted way the Sony DSDT code handles power 
> management for the graphics adapters, I have my doubts that there will be a 
> generic way. Of course a framework like for the rf kill switch could be 
> useful, but the vendor and model specific code would end up in sony-laptop 
> anyway.

The Dell XPS 13 has an identical _DSM despite having dual nvidia/nvidia 
graphics. The _DSM code in the Vaio DSDT is also very stylistically 
different to the rest of it, heavily supporting the idea that it's 
nvidia-derived code.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28 12:22       ` Matthew Garrett
@ 2009-03-28 14:19         ` Matthias Welwarsky
  2009-03-28 14:44           ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Matthias Welwarsky @ 2009-03-28 14:19 UTC (permalink / raw)
  To: linux-acpi

On Saturday 28 March 2009 13:22:13 Matthew Garrett wrote:
> On Sat, Mar 28, 2009 at 09:41:12AM +0100, Matthias Welwarsky wrote:
> > Looking at the somewhat twisted way the Sony DSDT code handles power
> > management for the graphics adapters, I have my doubts that there will be
> > a generic way. Of course a framework like for the rf kill switch could be
> > useful, but the vendor and model specific code would end up in
> > sony-laptop anyway.
>
> The Dell XPS 13 has an identical _DSM despite having dual nvidia/nvidia
> graphics. The _DSM code in the Vaio DSDT is also very stylistically
> different to the rest of it, heavily supporting the idea that it's
> nvidia-derived code.

Since it's not covered by any standard, I guess switching methods will deviate 
over time as more hybrid graphics laptops are released. It could be 
interesting to add generic functions to access _DSM methods, which is part of 
the ACPI spec.

But first and foremost I'm interested in how to initialize it the secondary 
adapter to the point where an X driver would be able to work with it. 
Obviously _DSM is not enough. What could I try additionally?

Oh, and no need to Cc me, I've subscribed to the list meanwhile.

regards,
	matthias


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28 14:19         ` Matthias Welwarsky
@ 2009-03-28 14:44           ` Matthew Garrett
  0 siblings, 0 replies; 18+ messages in thread
From: Matthew Garrett @ 2009-03-28 14:44 UTC (permalink / raw)
  To: Matthias Welwarsky; +Cc: linux-acpi

On Sat, Mar 28, 2009 at 03:19:21PM +0100, Matthias Welwarsky wrote:
> On Saturday 28 March 2009 13:22:13 Matthew Garrett wrote:
> > The Dell XPS 13 has an identical _DSM despite having dual nvidia/nvidia
> > graphics. The _DSM code in the Vaio DSDT is also very stylistically
> > different to the rest of it, heavily supporting the idea that it's
> > nvidia-derived code.
> 
> Since it's not covered by any standard, I guess switching methods will deviate 
> over time as more hybrid graphics laptops are released. It could be 
> interesting to add generic functions to access _DSM methods, which is part of 
> the ACPI spec.

_DSM is only specced in the loosest of senses - it's just a standardised 
namespace and calling convention, with the method being able to do 
whatever it wants. Given that nvidia support the hybrid switching in 
their Windows drivers without needing third party support, I think it's 
pretty likely that they'll just extend the current interface rather than 
change it completely. Of course, Apple's solution is implemented 
differently.

> But first and foremost I'm interested in how to initialize it the secondary 
> adapter to the point where an X driver would be able to work with it. 
> Obviously _DSM is not enough. What could I try additionally?

You need to work out how to reinitialise the chip from cold. This is 
non-trivial. Start with nouveau - you'll need to extend the BIOS parsing 
and script execution to cover G80, but then it "should" just be a matter 
of calling the init script and letting the BIOS do the rest of the work.

> Oh, and no need to Cc me, I've subscribed to the list meanwhile.

It's normal practice on kernel lists. Set an appropriate header if you 
don't want them.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-28 12:00       ` Matthew Garrett
@ 2009-03-31 15:20         ` Matthew Garrett
  2009-04-13 15:03           ` Norbert Preining
  0 siblings, 1 reply; 18+ messages in thread
From: Matthew Garrett @ 2009-03-31 15:20 UTC (permalink / raw)
  To: Norbert Preining
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

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

I've done some more work on this and here's the current state of things. 
It's a module that loads, checks what state the firmware thinks the 
hardware is in and then ensures that the hardware is actually in that 
state. I believe that it gets the choice between internal and discrete 
GPUs correct. It doesn't support runtime switching right now since 
there's no way to do anything useful with it, but it's a trivial sysfs 
attribute.

I've done this outside sony-laptop since it's not specific to Sonys in 
any way. It would be wonderful if anyone with any of the other hybrid 
nvidias (except the Apples, which seem to be entirely different) could 
give it a go.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

[-- Attachment #2: nvidia-control.c --]
[-- Type: text/x-csrc, Size: 2852 bytes --]

#include <linux/acpi.h>
#include <acpi/acpi_drivers.h>
#include <acpi/acpi_bus.h>
#include <linux/pci.h>

static int nvidia_dsm(struct pci_dev *dev, int func, int arg, int *result)
{
	static char muid[] = {
		0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
		0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
	};

	struct acpi_handle *handle;
	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
	struct acpi_object_list input;
	union acpi_object params[4];
	union acpi_object *obj;
	int err;

	handle = DEVICE_ACPI_HANDLE(&dev->dev);

	if (!handle)
		return -ENODEV;

	input.count = 4;
	input.pointer = params;
	params[0].type = ACPI_TYPE_BUFFER;
	params[0].buffer.length = sizeof(muid);
	params[0].buffer.pointer = (char *)muid;
	params[1].type = ACPI_TYPE_INTEGER;
	params[1].integer.value = 0x00000102;
	params[2].type = ACPI_TYPE_INTEGER;
	params[2].integer.value = func;
	params[3].type = ACPI_TYPE_INTEGER;
	params[3].integer.value = arg;

	err = acpi_evaluate_object(handle, "_DSM", &input, &output);
	if (err) {
		printk(KERN_ERR "nvidia-control: failed to evaluate _DSM: %d\n",
		       err);
		return err;
	}

	obj = (union acpi_object *)output.pointer;

	if (obj->type == ACPI_TYPE_INTEGER)
		if (obj->integer.value == 0x80000002)
			return -ENODEV;

	if (obj->type == ACPI_TYPE_BUFFER) {
		if (obj->buffer.length == 4 && result) {
			*result = 0;
			*result |= obj->buffer.pointer[0];
			*result |= (obj->buffer.pointer[1] << 8);
			*result |= (obj->buffer.pointer[2] << 16);
			*result |= (obj->buffer.pointer[3] << 24);
		}
	}

	kfree(output.pointer);
	return 0;
}

int nvidia_control_setup(struct pci_dev *dev)
{
	int result;

	if (nvidia_dsm(dev, 1, 0, &result))
		return -ENODEV;

	printk(KERN_INFO "nvidia-control: hardware status gave 0x%x\n", result);

	if (result &= 0x1) {	/* Stamina mode - disable the external GPU */
		nvidia_dsm(dev, 0x2, 0x11, NULL);
		nvidia_dsm(dev, 0x3, 0x02, NULL);
	} else {		/* Ensure that the external GPU is enabled */
		nvidia_dsm(dev, 0x2, 0x12, NULL);
		nvidia_dsm(dev, 0x3, 0x01, NULL);
	}

	return 0;
}

int nvidia_control_probe(struct pci_dev *dev)
{
	int support = 0;
	
	if (nvidia_dsm(dev, 0, 0, &support))
		 return -ENODEV;

	if (!support)
		return -ENODEV;

	return 0;
}

static int __init nvidia_control_init(void)
{
	struct pci_dev *dev = NULL;
	while ((dev = pci_get_device(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, dev))) {
		if (dev->class == 0x30000)
			if (!nvidia_control_probe(dev))
				nvidia_control_setup(dev);
	}
	return 0;
}

static void __exit nvidia_control_exit(void)
{
	return;
}

static const struct pci_device_id pci_ids [] = {
	{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
	  (PCI_CLASS_DISPLAY_VGA << 8), 0xffff00},
	{ },
};

MODULE_DEVICE_TABLE(pci, pci_ids);

module_init(nvidia_control_init);
module_exit(nvidia_control_exit);

MODULE_LICENSE("GPL");

[-- Attachment #3: Makefile --]
[-- Type: text/plain, Size: 79 bytes --]

obj-m += nvidia-control.o

all:
	make -C /lib/modules/`uname -r`/build M=`pwd`

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-03-31 15:20         ` Matthew Garrett
@ 2009-04-13 15:03           ` Norbert Preining
  2009-04-13 15:06             ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2009-04-13 15:03 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

Hi all,

(back from mountains and destroyed laptop)

On Di, 31 Mär 2009, Matthew Garrett wrote:
> It's a module that loads, checks what state the firmware thinks the 
> hardware is in and then ensures that the hardware is actually in that 
> state. I believe that it gets the choice between internal and discrete 
> GPUs correct. It doesn't support runtime switching right now since 
> there's no way to do anything useful with it, but it's a trivial sysfs 
> attribute.

I tested it the following way:
- 2.6.29
- all patches from Mattia send for rc1 and rc2
- the module from your email
- boot and start x as ususal
- *after* starting X I loaded the module

Output:
[ 2120.435908] nvidia-control: hardware status gave 0x801f
and it seems that the Stamina LED did light up (I don't remeber whether
it was on before).

Anything else I can test?

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BALLYCUMBER
One of the six half-read books lying somewhere in your bed.
			--- Douglas Adams, The Meaning of Liff
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-04-13 15:03           ` Norbert Preining
@ 2009-04-13 15:06             ` Matthew Garrett
  2009-04-13 15:11               ` Norbert Preining
  0 siblings, 1 reply; 18+ messages in thread
From: Matthew Garrett @ 2009-04-13 15:06 UTC (permalink / raw)
  To: Norbert Preining
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Mon, Apr 13, 2009 at 05:03:02PM +0200, Norbert Preining wrote:

> Output:
> [ 2120.435908] nvidia-control: hardware status gave 0x801f
> and it seems that the Stamina LED did light up (I don't remeber whether
> it was on before).
> 
> Anything else I can test?

Is the power consumption then what you expected?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-04-13 15:06             ` Matthew Garrett
@ 2009-04-13 15:11               ` Norbert Preining
  2009-04-13 15:26                 ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2009-04-13 15:11 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Mo, 13 Apr 2009, Matthew Garrett wrote:
> Is the power consumption then what you expected?

Hard to say, suddenly powertop tells me
	no ACPI power usage estimate available
anyone any idea what that could come from???

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
HEATON PUNCHARDON (n.) A violent argument which breaks out in the car
on the way home from a party between a couple who have had to be
polite to each other in company all evening.
			--- Douglas Adams, The Meaning of Liff

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-04-13 15:11               ` Norbert Preining
@ 2009-04-13 15:26                 ` Matthew Garrett
  2009-04-13 15:43                   ` Norbert Preining
  0 siblings, 1 reply; 18+ messages in thread
From: Matthew Garrett @ 2009-04-13 15:26 UTC (permalink / raw)
  To: Norbert Preining
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Mon, Apr 13, 2009 at 05:11:36PM +0200, Norbert Preining wrote:
> On Mo, 13 Apr 2009, Matthew Garrett wrote:
> > Is the power consumption then what you expected?
> 
> Hard to say, suddenly powertop tells me
> 	no ACPI power usage estimate available
> anyone any idea what that could come from???

The system's unplugged, right?

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-04-13 15:26                 ` Matthew Garrett
@ 2009-04-13 15:43                   ` Norbert Preining
  2009-04-13 15:45                     ` Matthew Garrett
  0 siblings, 1 reply; 18+ messages in thread
From: Norbert Preining @ 2009-04-13 15:43 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Mo, 13 Apr 2009, Matthew Garrett wrote:
> The system's unplugged, right?

Umpfs, sorry, duck and hide. No, it wasn't.

So yes, it looks fine. Turning off all the devices but wifi, and
regulating down the brightness a bit, etc, I am back to around 13-14W. I
guess that is fine.

Thanks a lot.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining@logic.at>        Vienna University of Technology
Debian Developer <preining@debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
GOLANT (adj.)
Blank, sly and faintly embarrassed. Pertaining to the expression seen
on the face of someone who has clearly forgotten your name.
			--- Douglas Adams, The Meaning of Liff

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: new fixes for sony-acpi
  2009-04-13 15:43                   ` Norbert Preining
@ 2009-04-13 15:45                     ` Matthew Garrett
  0 siblings, 0 replies; 18+ messages in thread
From: Matthew Garrett @ 2009-04-13 15:45 UTC (permalink / raw)
  To: Norbert Preining
  Cc: Len Brown, sony-vaio-z-series, Mattia Dongili, Matthias Welwarsky,
	linux-acpi

On Mon, Apr 13, 2009 at 05:43:31PM +0200, Norbert Preining wrote:

> So yes, it looks fine. Turning off all the devices but wifi, and
> regulating down the brightness a bit, etc, I am back to around 13-14W. I
> guess that is fine.

Ok, sounds good. I'll tidy this up and submit it.
-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-04-13 15:45 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-23 16:34 new fixes for sony-acpi Norbert Preining
2009-03-28  1:34 ` Len Brown
2009-03-28  1:38   ` Matthew Garrett
2009-03-28  8:33     ` Norbert Preining
2009-03-28 12:00       ` Matthew Garrett
2009-03-31 15:20         ` Matthew Garrett
2009-04-13 15:03           ` Norbert Preining
2009-04-13 15:06             ` Matthew Garrett
2009-04-13 15:11               ` Norbert Preining
2009-04-13 15:26                 ` Matthew Garrett
2009-04-13 15:43                   ` Norbert Preining
2009-04-13 15:45                     ` Matthew Garrett
2009-03-28  8:41     ` Matthias Welwarsky
2009-03-28 12:11       ` Albert Vilella
2009-03-28 12:19         ` Matthew Garrett
2009-03-28 12:22       ` Matthew Garrett
2009-03-28 14:19         ` Matthias Welwarsky
2009-03-28 14:44           ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox