Ticket #10604 (new task)
upstream XO-1.5 wakeup source detection via _SWS
|Reported by:||dsd||Owned by:||dsd|
|Action Needed:||never set||Verified:||no|
|Deployments affected:||Blocked By:|
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.