Skip to content

Commit

Permalink
iio: light: apds9960: add system-wide suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Ranostay authored and Jonathan Cameron committed Apr 14, 2017
1 parent 4d4b305 commit d454ae2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/light/apds9960.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
};
Expand Down

0 comments on commit d454ae2

Please sign in to comment.