Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
60abce9f
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
60abce9f
编写于
5月 11, 2018
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'thermal-soc' into next
上级
13b86f50
c8da6cde
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
3 deletion
+11
-3
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/samsung/exynos_tmu.c
+11
-3
未找到文件。
drivers/thermal/samsung/exynos_tmu.c
浏览文件 @
60abce9f
...
@@ -185,6 +185,7 @@
...
@@ -185,6 +185,7 @@
* @regulator: pointer to the TMU regulator structure.
* @regulator: pointer to the TMU regulator structure.
* @reg_conf: pointer to structure to register with core thermal.
* @reg_conf: pointer to structure to register with core thermal.
* @ntrip: number of supported trip points.
* @ntrip: number of supported trip points.
* @enabled: current status of TMU device
* @tmu_initialize: SoC specific TMU initialization method
* @tmu_initialize: SoC specific TMU initialization method
* @tmu_control: SoC specific TMU control method
* @tmu_control: SoC specific TMU control method
* @tmu_read: SoC specific TMU temperature read method
* @tmu_read: SoC specific TMU temperature read method
...
@@ -205,6 +206,7 @@ struct exynos_tmu_data {
...
@@ -205,6 +206,7 @@ struct exynos_tmu_data {
struct
regulator
*
regulator
;
struct
regulator
*
regulator
;
struct
thermal_zone_device
*
tzd
;
struct
thermal_zone_device
*
tzd
;
unsigned
int
ntrip
;
unsigned
int
ntrip
;
bool
enabled
;
int
(
*
tmu_initialize
)(
struct
platform_device
*
pdev
);
int
(
*
tmu_initialize
)(
struct
platform_device
*
pdev
);
void
(
*
tmu_control
)(
struct
platform_device
*
pdev
,
bool
on
);
void
(
*
tmu_control
)(
struct
platform_device
*
pdev
,
bool
on
);
...
@@ -398,6 +400,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
...
@@ -398,6 +400,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
mutex_lock
(
&
data
->
lock
);
mutex_lock
(
&
data
->
lock
);
clk_enable
(
data
->
clk
);
clk_enable
(
data
->
clk
);
data
->
tmu_control
(
pdev
,
on
);
data
->
tmu_control
(
pdev
,
on
);
data
->
enabled
=
on
;
clk_disable
(
data
->
clk
);
clk_disable
(
data
->
clk
);
mutex_unlock
(
&
data
->
lock
);
mutex_unlock
(
&
data
->
lock
);
}
}
...
@@ -889,19 +892,24 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
...
@@ -889,19 +892,24 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
static
int
exynos_get_temp
(
void
*
p
,
int
*
temp
)
static
int
exynos_get_temp
(
void
*
p
,
int
*
temp
)
{
{
struct
exynos_tmu_data
*
data
=
p
;
struct
exynos_tmu_data
*
data
=
p
;
int
value
,
ret
=
0
;
if
(
!
data
||
!
data
->
tmu_read
)
if
(
!
data
||
!
data
->
tmu_read
||
!
data
->
enabled
)
return
-
EINVAL
;
return
-
EINVAL
;
mutex_lock
(
&
data
->
lock
);
mutex_lock
(
&
data
->
lock
);
clk_enable
(
data
->
clk
);
clk_enable
(
data
->
clk
);
*
temp
=
code_to_temp
(
data
,
data
->
tmu_read
(
data
))
*
MCELSIUS
;
value
=
data
->
tmu_read
(
data
);
if
(
value
<
0
)
ret
=
value
;
else
*
temp
=
code_to_temp
(
data
,
value
)
*
MCELSIUS
;
clk_disable
(
data
->
clk
);
clk_disable
(
data
->
clk
);
mutex_unlock
(
&
data
->
lock
);
mutex_unlock
(
&
data
->
lock
);
return
0
;
return
ret
;
}
}
#ifdef CONFIG_THERMAL_EMULATION
#ifdef CONFIG_THERMAL_EMULATION
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录