函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\suspend_test.c Create Date:2022-07-27 10:58:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:test_suspend

函数原型:static int __init test_suspend(void)

返回类型:int

参数:

181  static char warn_no_rtc[] __initdata = warning conditions  "PM: no wakealarm-capable RTC driver is ready\n"
184  struct rtc_device * rtc = NULL
189  如果非Kernel options like "test_suspend=mem" force suspend/resume sanity tests* at startup time. They're normally disabled, for faster boot and because* we can't know which states really work on this particular system.则返回:0
192 test_state小于PM_SUSPEND_MAX循环
193  state_label等于pm_states[test_state]
195  如果state_label且非字符串比较退出
198  如果test_state恒等于PM_SUSPEND_MAX
199  printk(warn_bad_state, Kernel options like "test_suspend=mem" force suspend/resume sanity tests* at startup time. They're normally disabled, for faster boot and because* we can't know which states really work on this particular system.)
200  返回:0
204  dev等于class_find_device(rtc_class, NULL, NULL, has_wakealarm)
205  如果dev
206  rtc等于rtc_class_open(dev_name(dev))
207  put_device(dev)
209  如果非rtc
210  printk(warn_no_rtc)
211  返回:0
215  To test system suspend, we need a hands-off mechanism to resume the* system. RTCs wake alarms are a common self-contained mechanism.
216  rtc_class_close(rtc)
217  返回:0