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
d9df93ec
Commit
d9df93ec
authored
Sep 09, 2015
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-opp' into pm-cpufreq
parents
63431f78
4eafbd15
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
drivers/base/power/opp.c
drivers/base/power/opp.c
+30
-0
include/linux/pm_opp.h
include/linux/pm_opp.h
+6
-0
No files found.
drivers/base/power/opp.c
View file @
d9df93ec
...
@@ -340,6 +340,36 @@ unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
...
@@ -340,6 +340,36 @@ unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
}
}
EXPORT_SYMBOL_GPL
(
dev_pm_opp_get_max_clock_latency
);
EXPORT_SYMBOL_GPL
(
dev_pm_opp_get_max_clock_latency
);
/**
* dev_pm_opp_get_suspend_opp() - Get suspend opp
* @dev: device for which we do this operation
*
* Return: This function returns pointer to the suspend opp if it is
* defined, otherwise it returns NULL.
*
* Locking: This function must be called under rcu_read_lock(). opp is a rcu
* protected pointer. The reason for the same is that the opp pointer which is
* returned will remain valid for use with opp_get_{voltage, freq} only while
* under the locked area. The pointer returned must be used prior to unlocking
* with rcu_read_unlock() to maintain the integrity of the pointer.
*/
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
)
{
struct
device_opp
*
dev_opp
;
struct
dev_pm_opp
*
opp
;
opp_rcu_lockdep_assert
();
dev_opp
=
_find_device_opp
(
dev
);
if
(
IS_ERR
(
dev_opp
))
opp
=
NULL
;
else
opp
=
dev_opp
->
suspend_opp
;
return
opp
;
}
EXPORT_SYMBOL_GPL
(
dev_pm_opp_get_suspend_opp
);
/**
/**
* dev_pm_opp_get_opp_count() - Get number of opps available in the opp list
* dev_pm_opp_get_opp_count() - Get number of opps available in the opp list
* @dev: device for which we do this operation
* @dev: device for which we do this operation
...
...
include/linux/pm_opp.h
View file @
d9df93ec
...
@@ -34,6 +34,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
...
@@ -34,6 +34,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_opp *opp);
int
dev_pm_opp_get_opp_count
(
struct
device
*
dev
);
int
dev_pm_opp_get_opp_count
(
struct
device
*
dev
);
unsigned
long
dev_pm_opp_get_max_clock_latency
(
struct
device
*
dev
);
unsigned
long
dev_pm_opp_get_max_clock_latency
(
struct
device
*
dev
);
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
);
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
unsigned
long
freq
,
unsigned
long
freq
,
...
@@ -80,6 +81,11 @@ static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
...
@@ -80,6 +81,11 @@ static inline unsigned long dev_pm_opp_get_max_clock_latency(struct device *dev)
return
0
;
return
0
;
}
}
static
inline
struct
dev_pm_opp
*
dev_pm_opp_get_suspend_opp
(
struct
device
*
dev
)
{
return
NULL
;
}
static
inline
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
static
inline
struct
dev_pm_opp
*
dev_pm_opp_find_freq_exact
(
struct
device
*
dev
,
unsigned
long
freq
,
bool
available
)
unsigned
long
freq
,
bool
available
)
{
{
...
...
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