/sys/devices/.../power/control
drivers/base/power/sysfs.c
auto: to allow the devices to be power managed by run time
on: to prevent the devices from being power managed by run time, the realization way is to add usage_count to prevent power_down/runtime_suspend
/sys/devices/.../power/wakeup
drivers/base/power/sysfs.c
drivers/base/power/wakeup.c
/sys/kernel/debug/wakeup_sources
enable:
disable:
not find the ture useness.
async_synchronize_full()
async_synchronize_full - synchronize all asynchronous function calls
This function waits until all asynchronous function calls have been done.
device_enable_async_suspend()
to run suspend function in no dependacy and calling sleep/block
/sys/kernel/debug/suspend_stats
kernel/power/main.c
used to monitor the suspend/resume states.
kernel/power/suspend.c
suspend_set_ops() is used to set platform_suspend_ops *suspend_ops, it contains the "enter" operation, which is used to set S3 state.
kernel/power/suspend.c
pm_suspend() is the entrance of suspend() function.
drivers/base/power/main.c
device_pm_add() is used to add the device which will run suspend/resume to the dpm_list.
platform_device_register()->platform_device_register()->dev_set_name()
power.0 is a plantform device registered by kernel/power/wakelock.c
arch/x86/kernel/smpboot.c
arch/x86/kernel/process_32.c
drivers/idle/intel_idle.c
start_secondary()->cpu_idle()-> pm_idle()->cpuidle_idle_call()-> target_state->enter()
drivers/cpuidle/sysfs.c
drivers/cpuidle/governors/ladder.c
drivers/cpuidle/governors/menu.c //default setting for idle governor
/sys/devices/system/cpu/cpuidle/current_governor_ro
next_state = cpuidle_curr_governor->select(dev); /* ask the governor for the next state */
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq_userspace.c
echo userspace > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 1600000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed
阅读(2067) | 评论(0) | 转发(0) |