瀏覽代碼

PM / platform_bus: Allow runtime PM by default

Currently the default runtime PM callbacks for platform devices return
-ENOSYS, preventing the use of runtime PM platforms until they have
provided at least a default implementation. This hinders the use of
runtime PM by devices which work with many platforms such as memory
mapped devices, MFDs and on chip IPs shared by multiple architectures.

Change the default implementation to the standard pm_generic_runtime
one, allowing drivers to use runtime PM without per-architecture
changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Mark Brown 15 年之前
父節點
當前提交
543f2503a9
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      drivers/base/platform.c

+ 3 - 3
drivers/base/platform.c

@@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
 
 
 int __weak platform_pm_runtime_suspend(struct device *dev)
 int __weak platform_pm_runtime_suspend(struct device *dev)
 {
 {
-	return -ENOSYS;
+	return pm_generic_runtime_suspend(dev);
 };
 };
 
 
 int __weak platform_pm_runtime_resume(struct device *dev)
 int __weak platform_pm_runtime_resume(struct device *dev)
 {
 {
-	return -ENOSYS;
+	return pm_generic_runtime_resume(dev);
 };
 };
 
 
 int __weak platform_pm_runtime_idle(struct device *dev)
 int __weak platform_pm_runtime_idle(struct device *dev)
 {
 {
-	return -ENOSYS;
+	return pm_generic_runtime_idle(dev);
 };
 };
 
 
 #else /* !CONFIG_PM_RUNTIME */
 #else /* !CONFIG_PM_RUNTIME */