aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2013-02-04 08:37:20 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-02-19 19:33:41 -0500
commitf43f627d2f17e95c78647eeddf968d12f5c286b1 (patch)
tree6422cc20ed378f976a7ef4408921c712e5299dc8 /include/linux/pm.h
parent210561ffd72d00eccf12c0131b8024d5436bae95 (diff)
PM: make VT switching to the suspend console optional v3
KMS drivers can potentially restore the display configuration without userspace help. Such drivers can can call a new funciton, pm_vt_switch_required(false) if they support this feature. In that case, the PM layer won't VT switch to the suspend console at suspend time and then back to the original VT on resume, but rather leave things alone for a nicer looking suspend and resume sequence. v2: make a function so we can handle multiple drivers (Alan) v3: use a list to track device requests (Rafael) v4: Squash in build fix from Jesse for CONFIG_VT_CONSOLE_SLEEP=n v5: Squash in patch from Wu Fengguang to add a few missing static qualifiers. v6: Add missing EXPORT_SYMBOL. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (v3) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r--include/linux/pm.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 03d7bb145311..e5da2f353e8f 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -35,6 +35,19 @@ extern void (*pm_idle)(void);
35extern void (*pm_power_off)(void); 35extern void (*pm_power_off)(void);
36extern void (*pm_power_off_prepare)(void); 36extern void (*pm_power_off_prepare)(void);
37 37
38struct device; /* we have a circular dep with device.h */
39#ifdef CONFIG_VT_CONSOLE_SLEEP
40extern void pm_vt_switch_required(struct device *dev, bool required);
41extern void pm_vt_switch_unregister(struct device *dev);
42#else
43static inline void pm_vt_switch_required(struct device *dev, bool required)
44{
45}
46static inline void pm_vt_switch_unregister(struct device *dev)
47{
48}
49#endif /* CONFIG_VT_CONSOLE_SLEEP */
50
38/* 51/*
39 * Device power management 52 * Device power management
40 */ 53 */