[Trac #555] Add PM event for battery status change
Zarro Boogs per Child
bugtracker at laptop.org
Tue Dec 12 02:40:53 EST 2006
#555: Add PM event for battery status change
-------------------------+--------------------------------------------------
Reporter: krstic | Owner: ted.juan
Type: enhancement | Status: new
Priority: normal | Milestone: BTest-2
Component: hardware | Resolution:
Keywords: |
-------------------------+--------------------------------------------------
Comment (by ted.juan):
Hi Jim,
This problem is the same with ticket #224.
There is no ACPI feature in OLPC Spec.
Qunata need your proposal to add it in the EC code.
[[BR]]
[[BR]]
This is what ACPI does: (through 0x62/0x66 port)
1) EC detects the AC/battery insert/remove or battery percentage change,
it assert EC SCI
2) OS get a SCI. If it comes from EC SCI then it will send query embedded
controller(QR_EC) command (0x84) to EC
3) EC will place a notitification byte in output buffer
4) OS get the notification byte and run the relative _Qxx to process it
ACPI sample code
Device(EC0) {
Name(_GPE,0x9) //EC SCI connect to GPE.9
….
Method(_Q08) {Notify(\_SB.AC, 0x00)} //AC in/out
//Method(_Q09) {Notify(\_TZ.THRM, 0x80)} //Thermal
Method(_Q0B) {Notify(\_SB.BAT0, 0x80)} //Batt in/out
Method(_Q0C) {Notify(\_SB.LID, 0x80)} //Lid close
//Method(_Q0D) {Notify(\_SB.SLPB, 0x80)} //Hotkey
//Method(_Q0E) {Notify(\_SB.PWRB, 0x80)} //CM pwbtn
}
For OLPC design
1) We can still use the SCI for the interrupt (BIOS program correctly)
2) Define an query interface (0x62/0x66, 0x68/0x6c, or others?)
3) Define a query command to get the notification byte (AC in/out...), we
should
consider more about Lid close...
4) If it's battery related event, then battery driver retrieve the battery
information
5) Define the retrieve interface(0x380/0x381, or others)
6) wakeup event -- using SWI?
Ted
--
Ticket URL: <http://dev.laptop.org/ticket/555#comment:4>
One Laptop Per Child <http://laptop.org/>
More information about the Bugs
mailing list