linux Devfreq framwork

drivers/devfreq/devfreq.c

devfreq_list
devfreq_list_lock

find_device_devfreq() - find devfreq struct using device pointer.

devfreq_get_freq_level() - Lookup freq_table for the frequency.

struct devfreq:
time_in_state: statistics for how many time spent on the specific state.
last_stat_updated: record in which time the state being updated.
total_trans: total number of devfreq transitions.
trans_table: it is more like a two-dimensional array, which record devfreq transitions of from which old state to which target state.
something like:
0...maxstate,0...maxstate ... 0...maxstate
0         1              maxstate
min_freq:minimum frequency
max_freq:maximum frequency
work:the delayed work struct variable used for polling
stop_polling:devfreq polling status of a device, which will be used for function devfreq_monitor_suspend/resume function to indicate if the devfreq have been stop polling, if being suspend then stop_polling is true which means that polling have been stoped and if stop_polling is false which means that polling have been resumed and it can be stopped again. the default value should be false.
data: private data for governors
governor_name: the name of governor used with this devfreq
governor: method how to choose frequency based on the usage, which is the devfreq using governor.
profile: device-specific devfreq profile, which the devfreq using profile
node: used as a node in devfreq_list
lock: a mutex
dev: device register by devfreq class. dev.parent is the device using devfreq
previous_freq: previously configured frequency value, which is configure as the profile' initial_freq defaultly.
nb: assign nb.notifier_call as devfreq_notifier_call

update_devfreq() - Reevaluate the device and configure frequency.

devfreq_governor:
get_target_freq: return desired operating frequency for the device.
event_handler: callback for devfreq core framework to notify events to governors. Events include per device governor init and exit, opp changes out of devfreq, suspend and resume.

devfreq_monitor() - Periodically poll devfreq objects.

devfreq_monitor_start() - Start load monitoring of devfreq instance.

devfreq_monitor_stop() - Stop load monitoring of a devfreq instance.

devfreq_monitor_suspend() - Suspend load monitoring of a devfreq instance

devfreq_monitor_resume() - Resume load monitoring of a devfreq instance

devfreq_interval_update() - Update device devfreq monitoring interval

devfreq_notifier_call() - Notify that the device frequency requirements

devfreq_notifier_call() - Notify that the device frequency requirements has been changed out of devfreq framework.

_remove_devfreq() - Remove devfreq from the list and release its resources.

devfreq_dev_release() - Callback for struct device to release the device.

devfreq_add_device() - Add devfreq feature to the device
struct devfreq *devfreq_add_device(struct device *dev, struct devfreq_dev_profile *profile, const char *governor_name, void *data)

devfreq_remove_device() - Remove devfreq feature from a device.

devm_devfreq_add_device() - Resource-managed devfreq_add_device()

devm_devfreq_remove_device() - Resource-managed devfreq_remove_device()

devfreq_suspend_device() - Suspend devfreq of a device.

devfreq_resume_device() - Resume devfreq of a device.

devfreq_add_governor() - Add devfreq governor

devfreq_remove_device() - Remove devfreq feature from a device.

governor_show/governor_store/available_governors_show/cur_freq_show/target_freq_show/polling_interval_show/polling_interval_store/min_freq_store/min_freq_show/
max_freq_show/max_freq_store/available_frequencies_show/trans_stat_show

阅读全文      
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值