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
c2d0c666
Commit
c2d0c666
authored
Sep 03, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CPUFREQ] new cpufreq_driver->resume callback, needed (at least) for speedstep-smi.
parent
4eaf2745
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
Documentation/cpu-freq/cpu-drivers.txt
Documentation/cpu-freq/cpu-drivers.txt
+6
-0
drivers/cpufreq/cpufreq.c
drivers/cpufreq/cpufreq.c
+13
-0
include/linux/cpufreq.h
include/linux/cpufreq.h
+1
-0
No files found.
Documentation/cpu-freq/cpu-drivers.txt
View file @
c2d0c666
...
...
@@ -64,6 +64,12 @@ And optionally
cpufreq_driver.exit - A pointer to a per-CPU cleanup function.
cpufreq_driver.resume - A pointer to a per-CPU resume function
which is called with interrupts disabled
and _before_ the pre-suspend frequency
and/or policy is restored by a call to
->target or ->setpolicy.
cpufreq_driver.attr - A pointer to a NULL-terminated list of
"struct freq_attr" which allow to
export values to sysfs.
...
...
drivers/cpufreq/cpufreq.c
View file @
c2d0c666
...
...
@@ -495,6 +495,13 @@ static int cpufreq_resume(struct sys_device * sysdev)
if
(
!
cpu_policy
)
return
-
EINVAL
;
if
(
cpufreq_driver
->
resume
)
ret
=
cpufreq_driver
->
resume
(
cpu_policy
);
if
(
ret
)
{
printk
(
KERN_ERR
"cpufreq: resume failed in ->resume step on CPU %u
\n
"
,
cpu_policy
->
cpu
);
goto
out
;
}
if
(
cpufreq_driver
->
setpolicy
)
ret
=
cpufreq_driver
->
setpolicy
(
cpu_policy
);
else
...
...
@@ -503,6 +510,12 @@ static int cpufreq_resume(struct sys_device * sysdev)
*/
ret
=
cpufreq_driver
->
target
(
cpu_policy
,
cpu_policy
->
cur
,
CPUFREQ_RELATION_H
);
if
(
ret
)
{
printk
(
KERN_ERR
"cpufreq: resume failed in ->setpolicy/target step on CPU %u
\n
"
,
cpu_policy
->
cpu
);
goto
out
;
}
out:
cpufreq_cpu_put
(
cpu_policy
);
return
ret
;
...
...
include/linux/cpufreq.h
View file @
c2d0c666
...
...
@@ -179,6 +179,7 @@ struct cpufreq_driver {
/* optional */
int
(
*
exit
)
(
struct
cpufreq_policy
*
policy
);
int
(
*
resume
)
(
struct
cpufreq_policy
*
policy
);
struct
freq_attr
**
attr
;
};
...
...
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