Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f61d5b4d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
f61d5b4d
编写于
8月 15, 2013
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes' of .git into next
上级
036e8a13
ca56caa0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
11 deletion
+21
-11
drivers/thermal/step_wise.c
drivers/thermal/step_wise.c
+21
-11
未找到文件。
drivers/thermal/step_wise.c
浏览文件 @
f61d5b4d
...
...
@@ -51,44 +51,51 @@ static unsigned long get_target_state(struct thermal_instance *instance,
{
struct
thermal_cooling_device
*
cdev
=
instance
->
cdev
;
unsigned
long
cur_state
;
unsigned
long
next_target
;
/*
* We keep this instance the way it is by default.
* Otherwise, we use the current state of the
* cdev in use to determine the next_target.
*/
cdev
->
ops
->
get_cur_state
(
cdev
,
&
cur_state
);
next_target
=
instance
->
target
;
switch
(
trend
)
{
case
THERMAL_TREND_RAISING
:
if
(
throttle
)
{
cur_state
=
cur_state
<
instance
->
upper
?
next_target
=
cur_state
<
instance
->
upper
?
(
cur_state
+
1
)
:
instance
->
upper
;
if
(
cur_state
<
instance
->
lower
)
cur_state
=
instance
->
lower
;
if
(
next_target
<
instance
->
lower
)
next_target
=
instance
->
lower
;
}
break
;
case
THERMAL_TREND_RAISE_FULL
:
if
(
throttle
)
cur_state
=
instance
->
upper
;
next_target
=
instance
->
upper
;
break
;
case
THERMAL_TREND_DROPPING
:
if
(
cur_state
==
instance
->
lower
)
{
if
(
!
throttle
)
cur_state
=
-
1
;
next_target
=
THERMAL_NO_TARGET
;
}
else
{
cur_state
-=
1
;
if
(
cur_state
>
instance
->
upper
)
cur_state
=
instance
->
upper
;
next_target
=
cur_state
-
1
;
if
(
next_target
>
instance
->
upper
)
next_target
=
instance
->
upper
;
}
break
;
case
THERMAL_TREND_DROP_FULL
:
if
(
cur_state
==
instance
->
lower
)
{
if
(
!
throttle
)
cur_state
=
-
1
;
next_target
=
THERMAL_NO_TARGET
;
}
else
cur_state
=
instance
->
lower
;
next_target
=
instance
->
lower
;
break
;
default:
break
;
}
return
cur_state
;
return
next_target
;
}
static
void
update_passive_instance
(
struct
thermal_zone_device
*
tz
,
...
...
@@ -133,6 +140,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
old_target
=
instance
->
target
;
instance
->
target
=
get_target_state
(
instance
,
trend
,
throttle
);
if
(
old_target
==
instance
->
target
)
continue
;
/* Activate a passive thermal instance */
if
(
old_target
==
THERMAL_NO_TARGET
&&
instance
->
target
!=
THERMAL_NO_TARGET
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录