From: Raag Jadav <raag.jadav@intel.com>
To: linus.walleij@linaro.org, brgl@bgdev.pl,
mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com,
Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1 1/3] gpio: tangier: use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper
Date: Mon, 13 Nov 2023 18:45:58 +0530 [thread overview]
Message-ID: <20231113131600.10828-2-raag.jadav@intel.com> (raw)
In-Reply-To: <20231113131600.10828-1-raag.jadav@intel.com>
Use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper to export pm_ops to
GPIO_TANGIER namespace, so that they can be reused.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/gpio/gpio-tangier.c | 3 +++
drivers/gpio/gpio-tangier.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/gpio/gpio-tangier.c b/drivers/gpio/gpio-tangier.c
index 7ce3eddaed25..52d0868476e1 100644
--- a/drivers/gpio/gpio-tangier.c
+++ b/drivers/gpio/gpio-tangier.c
@@ -19,6 +19,7 @@
#include <linux/math.h>
#include <linux/module.h>
#include <linux/pinctrl/pinconf-generic.h>
+#include <linux/pm.h>
#include <linux/spinlock.h>
#include <linux/string_helpers.h>
#include <linux/types.h>
@@ -531,6 +532,8 @@ int tng_gpio_resume(struct device *dev)
}
EXPORT_SYMBOL_NS_GPL(tng_gpio_resume, GPIO_TANGIER);
+EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS(tng_gpio_pm_ops, tng_gpio_suspend, tng_gpio_resume, GPIO_TANGIER);
+
MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
MODULE_AUTHOR("Pandith N <pandith.n@intel.com>");
MODULE_AUTHOR("Raag Jadav <raag.jadav@intel.com>");
diff --git a/drivers/gpio/gpio-tangier.h b/drivers/gpio/gpio-tangier.h
index 16c4f22908fb..333e5f79b908 100644
--- a/drivers/gpio/gpio-tangier.h
+++ b/drivers/gpio/gpio-tangier.h
@@ -13,6 +13,7 @@
#define _GPIO_TANGIER_H_
#include <linux/gpio/driver.h>
+#include <linux/pm.h>
#include <linux/spinlock_types.h>
#include <linux/types.h>
@@ -114,4 +115,6 @@ int devm_tng_gpio_probe(struct device *dev, struct tng_gpio *gpio);
int tng_gpio_suspend(struct device *dev);
int tng_gpio_resume(struct device *dev);
+extern const struct dev_pm_ops tng_gpio_pm_ops;
+
#endif /* _GPIO_TANGIER_H_ */
--
2.17.1
next prev parent reply other threads:[~2023-11-13 13:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 13:15 [PATCH v1 0/3] Use the standard _PM_OPS() export macro in Intel Tangier GPIO driver Raag Jadav
2023-11-13 13:15 ` Raag Jadav [this message]
2023-11-13 13:15 ` [PATCH v1 2/3] gpio: elkhartlake: reuse pm_ops from Intel Tangier driver Raag Jadav
2023-11-13 13:16 ` [PATCH v1 3/3] gpio: tangier: unexport suspend/resume handles Raag Jadav
2023-11-13 15:58 ` [PATCH v1 0/3] Use the standard _PM_OPS() export macro in Intel Tangier GPIO driver Andy Shevchenko
2023-11-14 4:38 ` Raag Jadav
2023-11-14 11:49 ` Andy Shevchenko
2023-11-14 13:21 ` Raag Jadav
2023-11-14 11:59 ` Mika Westerberg
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=20231113131600.10828-2-raag.jadav@intel.com \
--to=raag.jadav@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bala.senthil@intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mallikarjunappa.sangannavar@intel.com \
--cc=mika.westerberg@linux.intel.com \
/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
all inboxes | Powered by JetHome®