[PATCH] allow sonypi to use ec_get ec_set in a patched linux-2.4 with latest acpi.

Ducrot Bruno
2003-01-22T15:47:26Z

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

Hi James,

On Tue, Jan 21, 2003 at 04:34:26AM -0500, James Shatto wrote:
> Pardon my newness to ACPI. That being said, I have an ACPI problem.
> However inconsistent it may be. The problem being sometimes it works, and
> when it does it keeps the computer cooler than APM, maybe even cooler than
> WinME. But when it doesn't my laptop gets really hot and shuts itself down.
>
> Is there anyway to fix this?
> Should I always use APM instead of ACPI?
> Should I use APM and ACPI?
> (The problem here is that SonyPI conflicts with APM)
>
> Laptop ='s Sony Vaio - PCG-FX215 - PIII 800MHz Duron
> VIA Tech VT82C686 Power Management Controller
>
> Power management details under windows:
> (Control Panel->System->Device Manager)
> ACPI AC Power Source
> ACPI Battery
> ACPI Embedded Controller
> ACPI Lid
> ACPI Sleep Button
> ACPI System Button
> Advanced Configuration and Power Interface BIOS
>
> When this doesn't work, it only takes about 5 to 30 minutes for the computer
> to get hot enough for it to shut itself down. I am running Debian
> Linux(Sarge). With Kernel 2.4.20pre3. I've had the same results with
> earlier 2.4 kernels, even with the ac patches. The only real extras are
> SonyPI and the Alsa drivers for sound. Is there a patch to fix this? If
> so, where would I go to find it?
>

Could you please try this patch? You have to get acpi-20021212 or
newer apci patch for it to work.

Stelian, could we have this patch in marcello tree, please ?

Cheers,

--
Ducrot Bruno

-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.

[-- Attachment #2: 00_2.4.21pre3acpi20021212_sonypi_h_allow_acpi.diff --]
[-- Type: text/plain, Size: 575 bytes --]

--- linux-2.4/drivers/char/sonypi.h 2003/01/21 10:19:05 1.1
+++ linux-2.4/drivers/char/sonypi.h 2003/01/22 13:18:44
@@ -358,6 +358,14 @@

extern int verbose;

+#ifdef CONFIG_ACPI
+#include <linux/acpi.h>
+#if (ACPI_CA_VERSION > 0x20021121)
+#define USE_ACPI
+#endif
+#endif
+
+#ifndef USE_ACPI
static inline int ec_write(u8 addr, u8 value) {
wait_on_command(1, inb_p(SONYPI_CST_IOPORT) & 3, ITERATIONS_LONG);
outb_p(0x81, SONYPI_CST_IOPORT);
@@ -378,6 +386,7 @@
*value = inb_p(SONYPI_DATA_IOPORT);
return 0;
}
+#endif /* USE_ACPI */

#endif /* __KERNEL__ */