Re: Re: Smart Battery System driver

Karol Kozimor
2005-01-16T10:49:54Z

Thus wrote Rich Townsend:
> ...which unfortunately doesn't mean a whole lot to me. How can I install
> some form of a handler, so that when the EC detects a Smart Battery
> event (and -- as per the ACPI spec -- sets the EC Alarm Address and Data
> registers), and then fires off a General Purpose Event, a chunk of *my*
> code gets run?
>
> Any pointers for the above questions will be very welcome -- and thanks
> to everyone who has responded with bug reports so far.

The best way to do this would be to insert a Notify statement in the code.
Here's a snippet from the appropriate method on my machine:

Notify (\_SB.ACAD, 0x80)

Of course, since you have a smart battery it is unlikely that you have an
AC adapter device present in the DSDT, so you'd have to hack up a device
in your tables and acpi_install_notify_handler() against it to have it
reported.
Best regards,

--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org

-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt