public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* New SmartBattery DSDT-based controller
@ 2005-01-29 19:02 Rich Townsend
       [not found] ` <41FBDDE2.1050403-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
  0 siblings, 1 reply; 42+ messages in thread
From: Rich Townsend @ 2005-01-29 19:02 UTC (permalink / raw)
  To: Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Dear All,

I've been quiet with recent updates on my Smart Battery driver, because
I've been digging deeper into how smart batteries are dealt with in a
variety of systems. What I've found is this: at the most basic level,
there are three ways of dealing with smart batteries (or for that
matter, any SMBus-based device) that are run by an ACPI-aware embedded
controller (EC):

1) Direct fiddling with the SMBus registers that make up part of the EC
address space. This is what Bruno Ducrot's i2c-acpi-ec module was for:
it exposed kernel-space functions to allow one to perform the required
fiddling. My acpi-sbs module then used these functions to examine the
status of the smart battery.

2) The use of an SMBus operating region, which makes each SMBus device
(i.e., battery, charger, selector, system manager) look like a set of
registers that can be read from or written to. Although quite elegant,
this approach requires a corresponding address space driver to be
implemented in the operating system (unlike approach 1 above).
Unfortunately, no such implementation currently exists for Linux.

3) The use of ACPI methods, as specified by the SMBus Control Method
Interface specification. These present a unified, consistent interface
to the SMBus, but internally may rely on a variety of approaches (such
as 1 above) to do the actual hardware control. This SMBus-CMI approach 
can be used with non-EC SMBus segments as well.

In most smart battery systems, these details are hidden from the
operating system, since the DSDT contains device definitions (BAT0,
BAT1, BAT2 etc) that make the smart battery appear -- to the OS -- like
a traditional Control Method (CM) battery. Laptop manufacturers that 
I've seen do this include Compaq, Gateway & Sony. HOWEVER, some 
manufacturers  -- Acer in particular -- have not included the CM code in
their DSDT, preferring to rely instead on a set of software-based tools 
to examine the battery status (most likely, via approach 1 above). And, 
of course, these tools are Windows specific.

This is where my new DSDT stuff comes in: I have written the necessary
DSDT code to add CM definitions for smart-battery based systems. I've
tried to make this code as platform-independent as possible, by
accessing the SMBus where possible via approach 3 (the uniform SMBus
Control Method Interface), but there is still a certain degree of
platform dependence to the code.

So it looks like the best way to move forward at the moment is:

1) Get a copy of your DSDT
2) Send it to me, with the *full* make/model of your machine
3) I'll add in the CM definitions to your DSDT
4) I'll post the modified DSDT on my website.
5) Download the modified DSDT, and install it following the instructions
at http://forums.gentoo.org/viewtopic.php?t=122145 (see section 9;
although in Gentoo forums, these instructions should work on most systems).

Eventually, the modified DSDTs can be put back into the ACPI4Linux 
database; but I'm more interested at the moment in ironing out any 
glitches in the code.

To get the ball rolling, I have on my website the two modified DSDTs:

Acer TravelMate 4502lmi:
http://shayol.bartol.udel.edu/~rhdt/download/tm4502lmi-sbs-cm.aml
(this is my own 1.6GHz Centrino machine, I've confirmed this works)

Acer TravelMate 4001wlmi:
http://shayol.bartol.udel.edu/~rhdt/download/tm4001wlmi-sbs-cm.aml
(this is based on the *fixed* DSDT posted on Johan Vromans' web page, 
for his 1.5Ghz Centrino machine; I've not been able to test it, but I 
expect it to work).

These of course can be converted into source code using an AML
disassembler, but if you want to see the code that these DSDTs were
compiled from (including lots of comments on the new CM code), just
change the extension from .aml to .asl in the URL.

I look forward to DSDTs and bug reports!

cheers,

Rich



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2005-02-08 18:53 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-29 19:02 New SmartBattery DSDT-based controller Rich Townsend
     [not found] ` <41FBDDE2.1050403-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-01-29 22:41   ` Johan Vromans
     [not found]     ` <m27jlvx3i3.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-01-29 23:45       ` Rich Townsend
     [not found]         ` <41FC2022.2080804-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-01-30  9:17           ` Johan Vromans
     [not found]             ` <m2mzur6zt6.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-01-30 13:38               ` Rich Townsend
     [not found]                 ` <41FCE348.3010304-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-01-30 14:31                   ` Karol Kozimor
2005-01-30 15:00                   ` Matthew Garrett
2005-01-30 14:59   ` Matthew Garrett
2005-01-30 15:31     ` Rich Townsend
2005-01-30 19:40     ` Johan Vromans
2005-01-31 22:59     ` Pavel Machek
2005-01-30 15:15   ` Pedro Venda
2005-01-31  9:50   ` Johan Vromans
     [not found]     ` <m24qgyorl3.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-01-31 10:02       ` David Goodenough
     [not found]         ` <200501311002.36671.david.goodenough-6b45v/Ft3lbby3iVrkZq2A@public.gmane.org>
2005-01-31 12:16           ` Johan Vromans
     [not found]             ` <m2oef5oksl.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-02-06 21:40               ` Johan Vromans
2005-01-31 11:57       ` Rich Townsend
     [not found]         ` <41FE1D2D.8030006-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-01-31 12:16           ` Johan Vromans
2005-01-31 15:12   ` Bruno Ducrot
     [not found]     ` <20050131151235.GB1145-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2005-01-31 15:39       ` Johan Vromans
     [not found]         ` <m2k6ptobfm.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-01-31 15:44           ` Karol Kozimor
2005-01-31 15:52           ` Ville Syrjälä
2005-01-31 15:59           ` Bruno Ducrot
     [not found]             ` <20050131155935.GD1145-kk6yZipjEM5g9hUCZPvPmw@public.gmane.org>
2005-01-31 17:48               ` Johan Vromans
     [not found]                 ` <m2u0oxjxqe.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-01-31 18:30                   ` Bruno Ducrot
2005-01-31 16:34       ` Rich Townsend
     [not found]         ` <41FE5E29.9020308-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-01-31 16:54           ` Bruno Ducrot
2005-01-31 17:28           ` Karol Kozimor
2005-02-06  2:19   ` sbs-linux: smart batteries on SourceForge (was New SmartBattery DSDT-based controller) Rich Townsend
     [not found]     ` <42057EBE.5090102-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-02-06 13:33       ` François Valenduc
     [not found]         ` <42061CB8.5040205-IWqWACnzNjyZIoH1IeqzKA@public.gmane.org>
2005-02-06 14:10           ` Olaf Jansen-Olliges
2005-02-06 17:28       ` sbs-linux: smart batteries on SourceForge Johan Vromans
     [not found]         ` <m28y61a98u.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-02-06 19:25           ` Johan Vromans
     [not found]             ` <m2oeex7ap2.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-02-06 19:29               ` Rich Townsend
     [not found]         ` <42066328.1080601@bartol.udel.edu>
2005-02-06 19:34           ` Johan Vromans
2005-02-07  9:32       ` Johan Vromans
     [not found]         ` <m23bw8zpdz.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-02-07 12:06           ` Rich Townsend
     [not found]             ` <420759DB.1000009-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-02-07 12:49               ` David Goodenough
     [not found]                 ` <200502071249.40300.david.goodenough-6b45v/Ft3lbby3iVrkZq2A@public.gmane.org>
2005-02-08 18:53                   ` Hendrik Jürgens
2005-02-06 21:42   ` New SmartBattery DSDT-based controller Johan Vromans
     [not found]     ` <m2mzuhz7pg.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2005-02-06 21:52       ` Rich Townsend
     [not found]         ` <42069196.707-OBnUx95tOyn10jlvfTC4gA@public.gmane.org>
2005-02-07  9:27           ` Johan Vromans

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