Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2304106
  • 博文数量: 318
  • 博客积分: 8752
  • 博客等级: 中将
  • 技术积分: 4944
  • 用 户 组: 普通用户
  • 注册时间: 2006-05-23 07:56
文章分类

全部博文(318)

文章存档

2019年(1)

2017年(2)

2016年(12)

2015年(2)

2014年(1)

2013年(17)

2012年(22)

2011年(9)

2010年(37)

2009年(33)

2008年(44)

2007年(43)

2006年(95)

分类: LINUX

2012-07-17 15:54:00

/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

阅读(2061) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~