]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
pinctrl: intel: Introduce common macro for PM operations
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 30 Aug 2018 16:27:43 +0000 (19:27 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 31 Aug 2018 09:25:23 +0000 (11:25 +0200)
This common macro will simplify the code of pin control drivers
for Intel SoCs.

Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/intel/pinctrl-intel.h

index 83a29e002f8987da01847488f6c53abf705b5bb3..acb723bbad87af70e6ad4e937da64fd5144642ff 100644 (file)
@@ -181,4 +181,9 @@ int intel_pinctrl_suspend(struct device *dev);
 int intel_pinctrl_resume(struct device *dev);
 #endif
 
+#define INTEL_PINCTRL_PM_OPS(_name)                                              \
+const struct dev_pm_ops _name = {                                                \
+       SET_LATE_SYSTEM_SLEEP_PM_OPS(intel_pinctrl_suspend, intel_pinctrl_resume) \
+}
+
 #endif /* PINCTRL_INTEL_H */