diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-04-07 12:05:06 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-04-07 12:05:06 +0200 |
commit | 38272fc445344d5ce9eea7341f6a06a04e3d21e3 (patch) | |
tree | 534e353e6f2e65a176eef77f197ec8f86ddf32f9 | |
parent | 5bc877329cdd47cf6870be39e6d4b6b4810dc6ae (diff) | |
download | hda-emu-38272fc445344d5ce9eea7341f6a06a04e3d21e3.tar.gz |
Restore the PM functionality
The recent code has moved the system PM ops conditionally with
CONFIG_PM_SLEEP. Also the more PM ops have been added in the upstream
and we need to follow that, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | include/codec_config.h | 1 | ||||
-rw-r--r-- | include/linux/pm.h | 6 | ||||
-rw-r--r-- | include/linux/pm_runtime.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/include/codec_config.h b/include/codec_config.h index 2042f0c..81e41c9 100644 --- a/include/codec_config.h +++ b/include/codec_config.h @@ -3,6 +3,7 @@ #define CONFIG_SND_JACK #define CONFIG_PM +#define CONFIG_PM_SLEEP #define CONFIG_SND_HDA_POWER_SAVE_DEFAULT 0 #define CONFIG_SND_DEBUG diff --git a/include/linux/pm.h b/include/linux/pm.h index 851be75..76bb72c 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -49,8 +49,14 @@ struct dev_pm_info { /* stripped version */ struct dev_pm_ops { + int (*prepare)(struct device *dev); + void (*complete)(struct device *dev); int (*suspend)(struct device *dev); int (*resume)(struct device *dev); + int (*freeze)(struct device *dev); + int (*thaw)(struct device *dev); + int (*poweroff)(struct device *dev); + int (*restore)(struct device *dev); int (*runtime_suspend)(struct device *dev); int (*runtime_resume)(struct device *dev); int (*runtime_idle)(struct device *dev); diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 5b8c36d..a575b55 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -17,6 +17,7 @@ static inline void pm_runtime_get_noresume(struct device *dev) { dev->pmcnt++; } static inline void pm_runtime_put_noidle(struct device *dev) { dev->pmcnt--; } static inline int pm_runtime_set_suspended(struct device *dev) { return 0; } // XXX +static inline int pm_request_resume(struct device *dev) { return 0; } // XXX int pm_runtime_get_sync(struct device *dev); int pm_runtime_get_if_in_use(struct device *dev); |