diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2013-02-04 13:37:20 +0000 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-02-20 01:33:41 +0100 |
commit | f43f627d2f17e95c78647eeddf968d12f5c286b1 (patch) | |
tree | 6422cc20ed378f976a7ef4408921c712e5299dc8 /include | |
parent | 210561ffd72d00eccf12c0131b8024d5436bae95 (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')
-rw-r--r-- | include/linux/pm.h | 13 |
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); extern void (*pm_power_off)(void); extern void (*pm_power_off_prepare)(void); +struct device; /* we have a circular dep with device.h */ +#ifdef CONFIG_VT_CONSOLE_SLEEP +extern void pm_vt_switch_required(struct device *dev, bool required); +extern void pm_vt_switch_unregister(struct device *dev); +#else +static inline void pm_vt_switch_required(struct device *dev, bool required) +{ +} +static inline void pm_vt_switch_unregister(struct device *dev) +{ +} +#endif /* CONFIG_VT_CONSOLE_SLEEP */ + /* * Device power management */ |