lkml.org 
[lkml]   [2001]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.4.16/2.5.0] sonypi driver update
Hi Marcelo, Linus and everybody else.

The following patch (which should apply cleanly on all recent
kernels) corrects a small bug which prevented a Sony VAIO
laptop to be put in APM sleep once the sonypi driver was used
(and could have interfered with ACPI code if compiled in...).

Please apply to both kernel branches.

Credits for this patch go to Michael C. B. Ashley & Bob Donnelly.

Stelian.


diff -uNr --exclude-from=dontdiff linux-2.4.16.orig/Documentation/sonypi.txt linux-2.4.16/Documentation/sonypi.txt
--- linux-2.4.16.orig/Documentation/sonypi.txt Mon Oct 15 17:38:31 2001
+++ linux-2.4.16/Documentation/sonypi.txt Thu Nov 29 14:52:23 2001
@@ -58,6 +58,10 @@
get enabled unless you set this parameter to 1.
Do not use this option unless it's actually necessary,
some Vaio models don't deal well with this option.
+ This option is available only if the kernel is
+ compiled without ACPI support (since it conflicts
+ with it and it shouldn't be required anyway if
+ ACPI is already enabled).

verbose: print unknown events from the sonypi device

@@ -93,7 +97,10 @@
- some users reported that the laptop speed is lower (dhrystone
tested) when using the driver with the fnkeyinit parameter. I cannot
reproduce it on my laptop and not all users have this problem.
- Still under investigation.
+ This happens because the fnkeyinit parameter enables the ACPI
+ mode (but without additionnal ACPI control, like processor
+ speed handling etc). Use ACPI instead of APM if it works on your
+ laptop.

- since all development was done by reverse engineering, there is
_absolutely no guarantee_ that this driver will not crash your
diff -uNr --exclude-from=dontdiff linux-2.4.16.orig/drivers/char/sonypi.c linux-2.4.16/drivers/char/sonypi.c
--- linux-2.4.16.orig/drivers/char/sonypi.c Mon Oct 15 17:38:31 2001
+++ linux-2.4.16/drivers/char/sonypi.c Thu Nov 29 12:01:01 2001
@@ -617,8 +617,11 @@
goto out3;
}

+#if !defined(CONFIG_ACPI)
+ /* Enable ACPI mode to get Fn key events */
if (fnkeyinit)
outb(0xf0, 0xb2);
+#endif

if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2)
sonypi_type2_srs();
@@ -666,6 +669,11 @@
sonypi_type2_dis();
else
sonypi_type1_dis();
+#if !defined(CONFIG_ACPI)
+ /* disable ACPI mode */
+ if (fnkeyinit)
+ outb(0xf1, 0xb2);
+#endif
free_irq(sonypi_device.irq, sonypi_irq);
release_region(sonypi_device.ioport1, sonypi_device.region_size);
misc_deregister(&sonypi_misc_device);
diff -uNr --exclude-from=dontdiff linux-2.4.16.orig/drivers/char/sonypi.h linux-2.4.16/drivers/char/sonypi.h
--- linux-2.4.16.orig/drivers/char/sonypi.h Mon Oct 15 17:38:31 2001
+++ linux-2.4.16/drivers/char/sonypi.h Thu Nov 29 14:52:42 2001
@@ -35,7 +35,7 @@
#ifdef __KERNEL__

#define SONYPI_DRIVER_MAJORVERSION 1
-#define SONYPI_DRIVER_MINORVERSION 7
+#define SONYPI_DRIVER_MINORVERSION 8

#include <linux/types.h>
#include <linux/pci.h>
--
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.027 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site