[Trac #224] Want IRQ on power/battery status change.

Zarro Boogs per Child bugtracker at laptop.org
Tue Oct 31 20:44:47 EST 2006


#224: Want IRQ on power/battery status change.
----------------------+-----------------------------------------------------
 Reporter:  dwmw2     |        Owner:  dwmw2  
     Type:  defect    |       Status:  new    
 Priority:  normal    |    Milestone:  BTest-2
Component:  hardware  |   Resolution:         
 Keywords:            |  
----------------------+-----------------------------------------------------
Comment (by ray.tseng at quantatw.com):

 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)

-- 
Ticket URL: <http://dev.laptop.org/ticket/224#comment:2>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list