public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: John Belmonte <jvb-ZFKsivP1bGvOQU1ULcgDhA@public.gmane.org>
To: "Grover, Andrew" <andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: acpi-devel <acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org>
Subject: [PATCH] Toshiba ACPI Extras 0.15
Date: Sat, 17 May 2003 11:40:13 -0400	[thread overview]
Message-ID: <3EC657DD.5040502@prairienet.org> (raw)

[-- 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;

                 reply	other threads:[~2003-05-17 15:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=3EC657DD.5040502@prairienet.org \
    --to=jvb-zfksivp1bgvoqu1ulcgdha@public.gmane.org \
    --cc=acpi-devel-pyega4qmqnRoyOMFzWx49A@public.gmane.org \
    --cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox