浏览代码

iio: light: apds9960: add system-wide suspend

APDS9960 can safely force runtime suspend if the system wants
to enter system-wide suspend

Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Matt Ranostay 8 年之前
父节点
当前提交
d454ae2edb
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/iio/light/apds9960.c

+ 2 - 0
drivers/iio/light/apds9960.c

@@ -1112,6 +1112,8 @@ static int apds9960_runtime_resume(struct device *dev)
 #endif
 
 static const struct dev_pm_ops apds9960_pm_ops = {
+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+				pm_runtime_force_resume)
 	SET_RUNTIME_PM_OPS(apds9960_runtime_suspend,
 			   apds9960_runtime_resume, NULL)
 };