#10604 NORM Future : upstream XO-1.5 wakeup source detection

Zarro Boogs per Child bugtracker at laptop.org
Thu Jan 13 08:57:05 EST 2011


#10604: upstream XO-1.5 wakeup source detection
--------------------+-------------------------------------------------------
 Reporter:  dsd     |                 Owner:  dsd           
     Type:  task    |                Status:  new           
 Priority:  normal  |             Milestone:  Future Release
Component:  kernel  |               Version:  not specified 
 Keywords:          |           Next_action:  never set     
 Verified:  0       |   Deployment_affected:                
Blockedby:          |              Blocking:                
--------------------+-------------------------------------------------------
 Upstream wakeup source detection for XO-1.5 is a bit tricky because the
 wakeup reason needs to be read *really* early during resume, even before
 acpi_suspend_enter() terminates.

 This is because we lose the ability to query power button state:

 {{{
         /* ACPI 3.0 specs (P62) says that it's the responsibility
          * of the OSPM to clear the status bit [ implying that the
          * POWER_BUTTON event should not reach userspace ]
          */
         if (ACPI_SUCCESS(status) && (acpi_state == ACPI_STATE_S3))
                 acpi_clear_event(ACPI_EVENT_POWER_BUTTON);
 }}}

 and I also suspect that we lose some of the other bits quite soon after.

 A dirty hook here would likely be rejected, and instead the correct
 solution would be implementing _SWS support in Linux and our DSDT.

 The DSDT side should actually be quite easy to do, as all of the wakeup
 sources can be represented by PM1 or GPE0 bits. We would have to implement
 _BFS to read the wakeup source then store it in memory, and then
 \_GPE._SWS and \_SB._SWS to present that info to Linux. One complication
 is the wifi, see explanation and workaround at
 http://lists.laptop.org/pipermail/devel/2011-January/030816.html

 The Linux side would need a bit of design consideration but shouldn't be
 hard to pull off.

 In the mean time, I'll attach a non-upstreamable patch illustrating how
 this can work.

-- 
Ticket URL: <http://dev.laptop.org/ticket/10604>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list