Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d9df93ec
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d9df93ec
编写于
9月 09, 2015
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pm-opp' into pm-cpufreq
上级
63431f78
4eafbd15
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
0 deletion
+36
-0
drivers/base/power/opp.c
drivers/base/power/opp.c
+30
-0
include/linux/pm_opp.h
include/linux/pm_opp.h
+6
-0
未找到文件。
drivers/base/power/opp.c
浏览文件 @
d9df93ec
...
...
@@ -340,6 +340,36 @@ unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
}
EXPORT_SYMBOL_GPL
(
dev_pm_opp_get_max_clock_latency
);
/**
* dev_pm_opp_get_suspend_opp() - Get suspend opp
* @dev: device for which we do this operation
*
* Return: This function returns pointer to the suspend opp if it is
* defined, otherwise it returns NULL.
*
* Locking: This function must be called under rcu_read_lock(). opp is a rcu
* protected pointer. The reason for the same is that the opp pointer which is
* returned will remain valid for use with opp_get_{voltage, freq} only while
* under the locked area. The pointer returned must be used prior to unlocking
* with rcu_read_unlock() to maintain the integrity of the pointer.
*/
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
)
{
struct
device_opp
*
dev_opp
;
struct
dev_pm_opp
*
opp
;
opp_rcu_lockdep_assert
();
dev_opp
=
_find_device_opp
(
dev
);
if
(
IS_ERR
(
dev_opp
))
opp
=
NULL
;
else
opp
=
dev_opp
->
suspend_opp
;
return
opp
;
}
EXPORT_SYMBOL_GPL
(
dev_pm_opp_get_suspend_opp
);
/**
* dev_pm_opp_get_opp_count() - Get number of opps available in the opp list
* @dev: device for which we do this operation
...
...
include/linux/pm_opp.h
浏览文件 @
d9df93ec
...
...
@@ -34,6 +34,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
int
dev_pm_opp_get_opp_count
(
struct
device
*
dev
);
unsigned
long
dev_pm_opp_get_max_clock_latency
(
struct
device
*
dev
);
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
);
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
unsigned
long
freq
,
...
...
@@ -80,6 +81,11 @@ static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
return
0
;
}
static
inline
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
)
{
return
NULL
;
}
static
inline
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
unsigned
long
freq
,
bool
available
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录