public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Toshiba ACPI Extras 0.15
@ 2003-05-17 15:40 John Belmonte
  0 siblings, 0 replies; only message in thread
From: John Belmonte @ 2003-05-17 15:40 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: acpi-devel

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

Hello Andy,

This is a patch for version 0.15 of my driver.  Please apply it to both the 2.5 
and 2.4 trees.

Changes:

     * Workaround sporatic problem on some machines where hotkey status stops
       working

     * Minor cleanup


Regards,
-John



-- 
http:// if   l .o  /


[-- Attachment #2: toshiba_acpi_0.15-linux_2.5.69.patch --]
[-- Type: text/plain, Size: 1776 bytes --]

--- toshiba_acpi.c.old	2003-05-17 11:15:06.000000000 -0400
+++ toshiba_acpi.c	2003-05-17 11:21:11.000000000 -0400
@@ -33,7 +33,7 @@
  *
  */
 
-#define TOSHIBA_ACPI_VERSION	"0.14"
+#define TOSHIBA_ACPI_VERSION	"0.15"
 #define PROC_INTERFACE_VERSION	1
 
 #include <linux/kernel.h>
@@ -172,9 +172,7 @@
 	for (i = 0; i < HCI_WORDS; ++i) {
 		in_objs[i].type = ACPI_TYPE_INTEGER;
 		in_objs[i].integer.value = in[i];
-		/*printk("%04x ", in[i]);*/
 	}
-	/*printk("\n");*/
 
 	results.length = sizeof(out_objs);
 	results.pointer = out_objs;
@@ -184,9 +182,7 @@
 	if ((status == AE_OK) && (out_objs->package.count <= HCI_WORDS)) {
 		for (i = 0; i < out_objs->package.count; ++i) {
 			out[i] = out_objs->package.elements[i].integer.value;
-			/*printk("%04x ", out[i]);*/
 		}
-		/*printk("\n");*/
 	}
 
 	return status;
@@ -226,7 +222,7 @@
 
 typedef struct _ProcItem
 {
-	char* name;
+	const char* name;
 	char* (*read_func)(char*);
 	unsigned long (*write_func)(const char*, unsigned long);
 } ProcItem;
@@ -284,10 +280,8 @@
 write_lcd(const char* buffer, unsigned long count)
 {
 	int value;
-	/*int byte_count;*/
 	u32 hci_result;
 
-	/* ISSUE: %i doesn't work with hex values as advertised */
 	if (snscanf(buffer, count, " brightness : %i", &value) == 1 &&
 			value >= 0 && value < HCI_LCD_BRIGHTNESS_LEVELS) {
 		value = value << HCI_LCD_BRIGHTNESS_SHIFT;
@@ -414,6 +408,11 @@
 			last_key_event = value;
 		} else if (hci_result == HCI_EMPTY) {
 			/* better luck next time */
+		} else if (hci_result == HCI_NOT_SUPPORTED) {
+			/* This is a workaround for an unresolved issue on
+			 * some machines where system events sporadically
+			 * become disabled. */
+			hci_write1(HCI_SYSTEM_EVENT, 1, &hci_result);
 		} else {
 			p += sprintf(p, "ERROR\n");
 			goto end;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-17 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-17 15:40 [PATCH] Toshiba ACPI Extras 0.15 John Belmonte

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