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
88cfe535
Commit
88cfe535
authored
Oct 16, 2015
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge back earlier 'pm-domains' material for v4.4.
parents
a98f1b78
7420aa4f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
320 deletions
+25
-320
drivers/base/power/domain.c
drivers/base/power/domain.c
+25
-255
drivers/soc/dove/pmu.c
drivers/soc/dove/pmu.c
+0
-1
include/linux/pm_domain.h
include/linux/pm_domain.h
+0
-64
No files found.
drivers/base/power/domain.c
View file @
88cfe535
This diff is collapsed.
Click to expand it.
drivers/soc/dove/pmu.c
View file @
88cfe535
...
@@ -396,7 +396,6 @@ int __init dove_init_pmu(void)
...
@@ -396,7 +396,6 @@ int __init dove_init_pmu(void)
__pmu_domain_register
(
domain
,
np
);
__pmu_domain_register
(
domain
,
np
);
}
}
pm_genpd_poweroff_unused
();
/* Loss of the interrupt controller is not a fatal error. */
/* Loss of the interrupt controller is not a fatal error. */
parent_irq
=
irq_of_parse_and_map
(
pmu
->
of_node
,
0
);
parent_irq
=
irq_of_parse_and_map
(
pmu
->
of_node
,
0
);
...
...
include/linux/pm_domain.h
View file @
88cfe535
...
@@ -15,7 +15,6 @@
...
@@ -15,7 +15,6 @@
#include <linux/err.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/of.h>
#include <linux/notifier.h>
#include <linux/notifier.h>
#include <linux/cpuidle.h>
/* Defines used for the flags field in the struct generic_pm_domain */
/* Defines used for the flags field in the struct generic_pm_domain */
#define GENPD_FLAG_PM_CLK (1U << 0)
/* PM domain uses PM clk */
#define GENPD_FLAG_PM_CLK (1U << 0)
/* PM domain uses PM clk */
...
@@ -38,11 +37,6 @@ struct gpd_dev_ops {
...
@@ -38,11 +37,6 @@ struct gpd_dev_ops {
bool
(
*
active_wakeup
)(
struct
device
*
dev
);
bool
(
*
active_wakeup
)(
struct
device
*
dev
);
};
};
struct
gpd_cpuidle_data
{
unsigned
int
saved_exit_latency
;
struct
cpuidle_state
*
idle_state
;
};
struct
generic_pm_domain
{
struct
generic_pm_domain
{
struct
dev_pm_domain
domain
;
/* PM domain operations */
struct
dev_pm_domain
domain
;
/* PM domain operations */
struct
list_head
gpd_list_node
;
/* Node in the global PM domains list */
struct
list_head
gpd_list_node
;
/* Node in the global PM domains list */
...
@@ -53,7 +47,6 @@ struct generic_pm_domain {
...
@@ -53,7 +47,6 @@ struct generic_pm_domain {
struct
dev_power_governor
*
gov
;
struct
dev_power_governor
*
gov
;
struct
work_struct
power_off_work
;
struct
work_struct
power_off_work
;
const
char
*
name
;
const
char
*
name
;
unsigned
int
in_progress
;
/* Number of devices being suspended now */
atomic_t
sd_count
;
/* Number of subdomains with power "on" */
atomic_t
sd_count
;
/* Number of subdomains with power "on" */
enum
gpd_status
status
;
/* Current state of the domain */
enum
gpd_status
status
;
/* Current state of the domain */
unsigned
int
device_count
;
/* Number of devices */
unsigned
int
device_count
;
/* Number of devices */
...
@@ -68,7 +61,6 @@ struct generic_pm_domain {
...
@@ -68,7 +61,6 @@ struct generic_pm_domain {
s64
max_off_time_ns
;
/* Maximum allowed "suspended" time. */
s64
max_off_time_ns
;
/* Maximum allowed "suspended" time. */
bool
max_off_time_changed
;
bool
max_off_time_changed
;
bool
cached_power_down_ok
;
bool
cached_power_down_ok
;
struct
gpd_cpuidle_data
*
cpuidle_data
;
int
(
*
attach_dev
)(
struct
generic_pm_domain
*
domain
,
int
(
*
attach_dev
)(
struct
generic_pm_domain
*
domain
,
struct
device
*
dev
);
struct
device
*
dev
);
void
(
*
detach_dev
)(
struct
generic_pm_domain
*
domain
,
void
(
*
detach_dev
)(
struct
generic_pm_domain
*
domain
,
...
@@ -125,29 +117,15 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
...
@@ -125,29 +117,15 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
struct
device
*
dev
,
struct
device
*
dev
,
struct
gpd_timing_data
*
td
);
struct
gpd_timing_data
*
td
);
extern
int
__pm_genpd_name_add_device
(
const
char
*
domain_name
,
struct
device
*
dev
,
struct
gpd_timing_data
*
td
);
extern
int
pm_genpd_remove_device
(
struct
generic_pm_domain
*
genpd
,
extern
int
pm_genpd_remove_device
(
struct
generic_pm_domain
*
genpd
,
struct
device
*
dev
);
struct
device
*
dev
);
extern
int
pm_genpd_add_subdomain
(
struct
generic_pm_domain
*
genpd
,
extern
int
pm_genpd_add_subdomain
(
struct
generic_pm_domain
*
genpd
,
struct
generic_pm_domain
*
new_subdomain
);
struct
generic_pm_domain
*
new_subdomain
);
extern
int
pm_genpd_add_subdomain_names
(
const
char
*
master_name
,
const
char
*
subdomain_name
);
extern
int
pm_genpd_remove_subdomain
(
struct
generic_pm_domain
*
genpd
,
extern
int
pm_genpd_remove_subdomain
(
struct
generic_pm_domain
*
genpd
,
struct
generic_pm_domain
*
target
);
struct
generic_pm_domain
*
target
);
extern
int
pm_genpd_attach_cpuidle
(
struct
generic_pm_domain
*
genpd
,
int
state
);
extern
int
pm_genpd_name_attach_cpuidle
(
const
char
*
name
,
int
state
);
extern
int
pm_genpd_detach_cpuidle
(
struct
generic_pm_domain
*
genpd
);
extern
int
pm_genpd_name_detach_cpuidle
(
const
char
*
name
);
extern
void
pm_genpd_init
(
struct
generic_pm_domain
*
genpd
,
extern
void
pm_genpd_init
(
struct
generic_pm_domain
*
genpd
,
struct
dev_power_governor
*
gov
,
bool
is_off
);
struct
dev_power_governor
*
gov
,
bool
is_off
);
extern
int
pm_genpd_poweron
(
struct
generic_pm_domain
*
genpd
);
extern
int
pm_genpd_name_poweron
(
const
char
*
domain_name
);
extern
void
pm_genpd_poweroff_unused
(
void
);
extern
struct
dev_power_governor
simple_qos_governor
;
extern
struct
dev_power_governor
simple_qos_governor
;
extern
struct
dev_power_governor
pm_domain_always_on_gov
;
extern
struct
dev_power_governor
pm_domain_always_on_gov
;
#else
#else
...
@@ -166,12 +144,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
...
@@ -166,12 +144,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
{
{
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
static
inline
int
__pm_genpd_name_add_device
(
const
char
*
domain_name
,
struct
device
*
dev
,
struct
gpd_timing_data
*
td
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_remove_device
(
struct
generic_pm_domain
*
genpd
,
static
inline
int
pm_genpd_remove_device
(
struct
generic_pm_domain
*
genpd
,
struct
device
*
dev
)
struct
device
*
dev
)
{
{
...
@@ -182,45 +154,15 @@ static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
...
@@ -182,45 +154,15 @@ static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
{
{
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
static
inline
int
pm_genpd_add_subdomain_names
(
const
char
*
master_name
,
const
char
*
subdomain_name
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_remove_subdomain
(
struct
generic_pm_domain
*
genpd
,
static
inline
int
pm_genpd_remove_subdomain
(
struct
generic_pm_domain
*
genpd
,
struct
generic_pm_domain
*
target
)
struct
generic_pm_domain
*
target
)
{
{
return
-
ENOSYS
;
return
-
ENOSYS
;
}
}
static
inline
int
pm_genpd_attach_cpuidle
(
struct
generic_pm_domain
*
genpd
,
int
st
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_name_attach_cpuidle
(
const
char
*
name
,
int
state
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_detach_cpuidle
(
struct
generic_pm_domain
*
genpd
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_name_detach_cpuidle
(
const
char
*
name
)
{
return
-
ENOSYS
;
}
static
inline
void
pm_genpd_init
(
struct
generic_pm_domain
*
genpd
,
static
inline
void
pm_genpd_init
(
struct
generic_pm_domain
*
genpd
,
struct
dev_power_governor
*
gov
,
bool
is_off
)
struct
dev_power_governor
*
gov
,
bool
is_off
)
{
{
}
}
static
inline
int
pm_genpd_poweron
(
struct
generic_pm_domain
*
genpd
)
{
return
-
ENOSYS
;
}
static
inline
int
pm_genpd_name_poweron
(
const
char
*
domain_name
)
{
return
-
ENOSYS
;
}
static
inline
void
pm_genpd_poweroff_unused
(
void
)
{}
#endif
#endif
static
inline
int
pm_genpd_add_device
(
struct
generic_pm_domain
*
genpd
,
static
inline
int
pm_genpd_add_device
(
struct
generic_pm_domain
*
genpd
,
...
@@ -229,12 +171,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
...
@@ -229,12 +171,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
return
__pm_genpd_add_device
(
genpd
,
dev
,
NULL
);
return
__pm_genpd_add_device
(
genpd
,
dev
,
NULL
);
}
}
static
inline
int
pm_genpd_name_add_device
(
const
char
*
domain_name
,
struct
device
*
dev
)
{
return
__pm_genpd_name_add_device
(
domain_name
,
dev
,
NULL
);
}
#ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP
#ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP
extern
void
pm_genpd_syscore_poweroff
(
struct
device
*
dev
);
extern
void
pm_genpd_syscore_poweroff
(
struct
device
*
dev
);
extern
void
pm_genpd_syscore_poweron
(
struct
device
*
dev
);
extern
void
pm_genpd_syscore_poweron
(
struct
device
*
dev
);
...
...
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