From da62224859c5c3d10c5cf518f64f3674d5b6c97b Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Wed, 10 Mar 2021 15:10:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=94=B5=E6=BA=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=86=85=E5=AE=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- .../Linux/Modules/PowerManager/Linux_电源控制.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Software/System/Linux/Modules/PowerManager/Linux_电源控制.md b/Software/System/Linux/Modules/PowerManager/Linux_电源控制.md index eb06d73..ffa2f1a 100644 --- a/Software/System/Linux/Modules/PowerManager/Linux_电源控制.md +++ b/Software/System/Linux/Modules/PowerManager/Linux_电源控制.md @@ -1,6 +1,17 @@ -# Linux 电源控制 +# Linux 电源管理子系统 + +## 1.用户态控制方法 ```bash +echo standby > /sys/power/state # Suspend to RAM echo "mem" > /sys/power/state ``` + +## 2.源码分析 + +### 2.1.Suspend + +Suspend 主流程源码在 \/kernel/power/suspend.c 文件中。主要调用流程如下: + +![]()