diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-11-30 18:02:10 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-01 15:47:58 -0500 |
commit | 221e9b58380abdd6c05e11b4538597e2586ee141 (patch) | |
tree | acc8e06b6f05050f5deec0c90e6fe63a8a09bdf1 /include/linux/pm_domain.h | |
parent | b02c999ac325e977585abeb4caf6e0a2ee21e30b (diff) |
PM / Domains: Add default power off governor function (v4)
Add a function deciding whether or not a given PM domain should
be powered off on the basis of the PM QoS constraints of devices
belonging to it and their PM QoS timing data.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index f6745c213a57..cc1a2450ff7b 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -61,8 +61,13 @@ struct generic_pm_domain { | |||
61 | bool suspend_power_off; /* Power status before system suspend */ | 61 | bool suspend_power_off; /* Power status before system suspend */ |
62 | bool dev_irq_safe; /* Device callbacks are IRQ-safe */ | 62 | bool dev_irq_safe; /* Device callbacks are IRQ-safe */ |
63 | int (*power_off)(struct generic_pm_domain *domain); | 63 | int (*power_off)(struct generic_pm_domain *domain); |
64 | s64 power_off_latency_ns; | ||
64 | int (*power_on)(struct generic_pm_domain *domain); | 65 | int (*power_on)(struct generic_pm_domain *domain); |
66 | s64 power_on_latency_ns; | ||
65 | struct gpd_dev_ops dev_ops; | 67 | struct gpd_dev_ops dev_ops; |
68 | s64 break_even_ns; /* Power break even for the entire domain. */ | ||
69 | s64 max_off_time_ns; /* Maximum allowed "suspended" time. */ | ||
70 | ktime_t power_off_time; | ||
66 | }; | 71 | }; |
67 | 72 | ||
68 | static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) | 73 | static inline struct generic_pm_domain *pd_to_genpd(struct dev_pm_domain *pd) |
@@ -80,6 +85,8 @@ struct gpd_link { | |||
80 | struct gpd_timing_data { | 85 | struct gpd_timing_data { |
81 | s64 stop_latency_ns; | 86 | s64 stop_latency_ns; |
82 | s64 start_latency_ns; | 87 | s64 start_latency_ns; |
88 | s64 save_state_latency_ns; | ||
89 | s64 restore_state_latency_ns; | ||
83 | s64 break_even_ns; | 90 | s64 break_even_ns; |
84 | }; | 91 | }; |
85 | 92 | ||