From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Paul Cercueil <paul@crapouillou.net>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>
Subject: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper
Date: Thu, 29 Dec 2022 14:59:55 +0200 [thread overview]
Message-ID: <20221229125957.45923-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20221229125957.45923-1-andriy.shevchenko@linux.intel.com>
There are a few drivers and might be more in the future that
open code the functionality of proposed DEFINE_NOIRQ_DEV_PM_OPS()
helper. From now on they may switch to the new helper and save
a few lines of code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/pm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 93cd34f00822..eba96822b1d9 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -444,6 +444,11 @@ const struct dev_pm_ops __maybe_unused name = { \
SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \
}
+#define DEFINE_NOIRQ_DEV_PM_OPS(name, suspend_fn, resume_fn) \
+const struct dev_pm_ops name = { \
+ NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \
+}
+
#define pm_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM), (_ptr))
#define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
--
2.35.1
next prev parent reply other threads:[~2022-12-29 12:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-29 12:59 [PATCH v1 0/3] pinctrl: intel: Provide NOIRQ PM helper and use it Andy Shevchenko
2022-12-29 12:59 ` Andy Shevchenko [this message]
2022-12-30 18:43 ` [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper Rafael J. Wysocki
2022-12-30 19:23 ` Andy Shevchenko
2022-12-30 19:32 ` Rafael J. Wysocki
2022-12-29 12:59 ` [PATCH v1 2/3] pinctrl: intel: Switch to use " Andy Shevchenko
2022-12-29 12:59 ` [PATCH v1 3/3] pinctrl: cherryview: " Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221229125957.45923-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=len.brown@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=paul@crapouillou.net \
--cc=pavel@ucw.cz \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).