Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
60abce9f
Commit
60abce9f
authored
May 11, 2018
by
Zhang Rui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'thermal-soc' into next
parents
13b86f50
c8da6cde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/samsung/exynos_tmu.c
+11
-3
No files found.
drivers/thermal/samsung/exynos_tmu.c
View file @
60abce9f
...
...
@@ -185,6 +185,7 @@
* @regulator: pointer to the TMU regulator structure.
* @reg_conf: pointer to structure to register with core thermal.
* @ntrip: number of supported trip points.
* @enabled: current status of TMU device
* @tmu_initialize: SoC specific TMU initialization method
* @tmu_control: SoC specific TMU control method
* @tmu_read: SoC specific TMU temperature read method
...
...
@@ -205,6 +206,7 @@ struct exynos_tmu_data {
struct
regulator
*
regulator
;
struct
thermal_zone_device
*
tzd
;
unsigned
int
ntrip
;
bool
enabled
;
int
(
*
tmu_initialize
)(
struct
platform_device
*
pdev
);
void
(
*
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
);
clk_enable
(
data
->
clk
);
data
->
tmu_control
(
pdev
,
on
);
data
->
enabled
=
on
;
clk_disable
(
data
->
clk
);
mutex_unlock
(
&
data
->
lock
);
}
...
...
@@ -889,19 +892,24 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
static
int
exynos_get_temp
(
void
*
p
,
int
*
temp
)
{
struct
exynos_tmu_data
*
data
=
p
;
int
value
,
ret
=
0
;
if
(
!
data
||
!
data
->
tmu_read
)
if
(
!
data
||
!
data
->
tmu_read
||
!
data
->
enabled
)
return
-
EINVAL
;
mutex_lock
(
&
data
->
lock
);
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
);
mutex_unlock
(
&
data
->
lock
);
return
0
;
return
ret
;
}
#ifdef CONFIG_THERMAL_EMULATION
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment