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
nexedi
linux
Commits
1577ddfa
Commit
1577ddfa
authored
Aug 08, 2016
by
Zhang Rui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'thermal-intel' and 'thermal-core' into next
parents
70c50ee7
165989a5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
3 deletions
+18
-3
drivers/thermal/clock_cooling.c
drivers/thermal/clock_cooling.c
+1
-0
drivers/thermal/fair_share.c
drivers/thermal/fair_share.c
+2
-0
drivers/thermal/gov_bang_bang.c
drivers/thermal/gov_bang_bang.c
+2
-0
drivers/thermal/power_allocator.c
drivers/thermal/power_allocator.c
+2
-0
drivers/thermal/step_wise.c
drivers/thermal/step_wise.c
+2
-0
drivers/thermal/thermal_core.c
drivers/thermal/thermal_core.c
+7
-3
drivers/thermal/thermal_hwmon.c
drivers/thermal/thermal_hwmon.c
+2
-0
No files found.
drivers/thermal/clock_cooling.c
View file @
1577ddfa
...
...
@@ -426,6 +426,7 @@ clock_cooling_register(struct device *dev, const char *clock_name)
if
(
!
ccdev
)
return
ERR_PTR
(
-
ENOMEM
);
mutex_init
(
&
ccdev
->
lock
);
ccdev
->
dev
=
dev
;
ccdev
->
clk
=
devm_clk_get
(
dev
,
clock_name
);
if
(
IS_ERR
(
ccdev
->
clk
))
...
...
drivers/thermal/fair_share.c
View file @
1577ddfa
...
...
@@ -116,7 +116,9 @@ static int fair_share_throttle(struct thermal_zone_device *tz, int trip)
instance
->
target
=
get_target_state
(
tz
,
cdev
,
percentage
,
cur_trip_level
);
mutex_lock
(
&
instance
->
cdev
->
lock
);
instance
->
cdev
->
updated
=
false
;
mutex_unlock
(
&
instance
->
cdev
->
lock
);
thermal_cdev_update
(
cdev
);
}
return
0
;
...
...
drivers/thermal/gov_bang_bang.c
View file @
1577ddfa
...
...
@@ -71,7 +71,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
dev_dbg
(
&
instance
->
cdev
->
device
,
"target=%d
\n
"
,
(
int
)
instance
->
target
);
mutex_lock
(
&
instance
->
cdev
->
lock
);
instance
->
cdev
->
updated
=
false
;
/* cdev needs update */
mutex_unlock
(
&
instance
->
cdev
->
lock
);
}
mutex_unlock
(
&
tz
->
lock
);
...
...
drivers/thermal/power_allocator.c
View file @
1577ddfa
...
...
@@ -529,7 +529,9 @@ static void allow_maximum_power(struct thermal_zone_device *tz)
continue
;
instance
->
target
=
0
;
mutex_lock
(
&
instance
->
cdev
->
lock
);
instance
->
cdev
->
updated
=
false
;
mutex_unlock
(
&
instance
->
cdev
->
lock
);
thermal_cdev_update
(
instance
->
cdev
);
}
}
...
...
drivers/thermal/step_wise.c
View file @
1577ddfa
...
...
@@ -175,7 +175,9 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip)
update_passive_instance
(
tz
,
trip_type
,
-
1
);
instance
->
initialized
=
true
;
mutex_lock
(
&
instance
->
cdev
->
lock
);
instance
->
cdev
->
updated
=
false
;
/* cdev needs update */
mutex_unlock
(
&
instance
->
cdev
->
lock
);
}
mutex_unlock
(
&
tz
->
lock
);
...
...
drivers/thermal/thermal_core.c
View file @
1577ddfa
...
...
@@ -1093,7 +1093,9 @@ int power_actor_set_power(struct thermal_cooling_device *cdev,
return
ret
;
instance
->
target
=
state
;
mutex_lock
(
&
cdev
->
lock
);
cdev
->
updated
=
false
;
mutex_unlock
(
&
cdev
->
lock
);
thermal_cdev_update
(
cdev
);
return
0
;
...
...
@@ -1623,11 +1625,13 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
struct
thermal_instance
*
instance
;
unsigned
long
target
=
0
;
mutex_lock
(
&
cdev
->
lock
);
/* cooling device is updated*/
if
(
cdev
->
updated
)
if
(
cdev
->
updated
)
{
mutex_unlock
(
&
cdev
->
lock
);
return
;
}
mutex_lock
(
&
cdev
->
lock
);
/* Make sure cdev enters the deepest cooling state */
list_for_each_entry
(
instance
,
&
cdev
->
thermal_instances
,
cdev_node
)
{
dev_dbg
(
&
cdev
->
device
,
"zone%d->target=%lu
\n
"
,
...
...
@@ -1637,9 +1641,9 @@ void thermal_cdev_update(struct thermal_cooling_device *cdev)
if
(
instance
->
target
>
target
)
target
=
instance
->
target
;
}
mutex_unlock
(
&
cdev
->
lock
);
cdev
->
ops
->
set_cur_state
(
cdev
,
target
);
cdev
->
updated
=
true
;
mutex_unlock
(
&
cdev
->
lock
);
trace_cdev_update
(
cdev
,
target
);
dev_dbg
(
&
cdev
->
device
,
"set to state %lu
\n
"
,
target
);
}
...
...
drivers/thermal/thermal_hwmon.c
View file @
1577ddfa
...
...
@@ -232,6 +232,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
return
result
;
}
EXPORT_SYMBOL_GPL
(
thermal_add_hwmon_sysfs
);
void
thermal_remove_hwmon_sysfs
(
struct
thermal_zone_device
*
tz
)
{
...
...
@@ -270,3 +271,4 @@ void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)
hwmon_device_unregister
(
hwmon
->
device
);
kfree
(
hwmon
);
}
EXPORT_SYMBOL_GPL
(
thermal_remove_hwmon_sysfs
);
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