[linux-pm] States we need to represent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

Updated proposal, if it looks okay, I'll submit it as a patch for
Documentation/power/devices.txt.

pm_message_t meaning

pm_message_t has two fields. event ("major"), and flags.  If driver
does not know event code, it aborts the request, returning
error. Unknown flag should be non-fatal.

Event codes are:

ON - no need to do anything except special cases like broken hw
FREEZE - stop dma and interrupts, and be prepared to reinit hw from scratch
SUSPEND - like FREEZE, but also put hardware into low-power state

All events are:

Apm standby -- prepare for APM event. Theoretically, drivers do not
need to do anything. In practice, it is very good idea to quiesce
devices. event = FREEZE, flags = APM_STANDBY

Apm suspend -- same as APM_STANDBY, but it we should probably avoid
spinning down disks. event = FREEZE, flags = APM_SUSPEND

System halt     -- nothing is needed except in very rare cases. event
= ON, flags = SYSTEM_HALT.

System reboot   -- nothing is needed except in very rare cases. event
= ON, flags = SYSTEM_REBOOT

System shutdown -- at least disks need to be spun down, or data is
lost. On non-broken hardware, nothing is needed. event = ON, flags =
SYSTEM_SHUTDOWN

Kexec    -- turn off DMAs and put hardware into some state where new
kernel can take over. event = FREEZE, flags = KEXEC

Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake
may need to be enabled on some devices. This actually has at least 3
subtypes, system can reboot, enter S4 and enter S5 at the end of
swsusp. event = ON, flags = SWSUSP and one of SYSTEM_REBOOT,
SYSTEM_SHUTDOWN, SYSTEM_S4

Suspend to ram  -- put devices into low power state. event = SUSPEND,
flags = SUSPEND_TO_RAM

Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put
devices into low power mode, but you must be able to reinitialize
device from scratch in resume method. This has two flavors, its done
once on suspending kernel, once on resuming kernel. event = FREEZE,
flags = DURING_SUSPEND or DURING_RESUME

Device detach requested from /sys -- deinitialize device; proably same as
SYSTEM_SHUTDOWN, I do not understand this one too much. probably event
= FREEZE, flags = DEV_DETACH.

System fully on -- device is working normally; this is probably never
passed to suspend() method... event = ON, flags = 0


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux