All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Balsam CHIHI <bchihi@baylibre.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Paul Cercueil <paul@crapouillou.net>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-pm@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>,
	Sean Wang <sean.wang@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>
Subject: [PATCH v2 09/10] pinctrl: renesas: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper
Date: Mon, 17 Jul 2023 20:28:20 +0300	[thread overview]
Message-ID: <20230717172821.62827-10-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com>

Since pm.h provides a helper for system no-IRQ PM callbacks,
switch the driver to use it instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/renesas/core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index 0c8d081da6a8..34232b016960 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -649,7 +649,7 @@ static const struct of_device_id sh_pfc_of_table[] = {
 };
 #endif
 
-#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM_PSCI_FW)
+#if defined(CONFIG_ARM_PSCI_FW)
 static void sh_pfc_nop_reg(struct sh_pfc *pfc, u32 reg, unsigned int idx)
 {
 }
@@ -732,15 +732,13 @@ static int sh_pfc_resume_noirq(struct device *dev)
 		sh_pfc_walk_regs(pfc, sh_pfc_restore_reg);
 	return 0;
 }
-
-static const struct dev_pm_ops sh_pfc_pm  = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(sh_pfc_suspend_noirq, sh_pfc_resume_noirq)
-};
-#define DEV_PM_OPS	&sh_pfc_pm
 #else
 static int sh_pfc_suspend_init(struct sh_pfc *pfc) { return 0; }
-#define DEV_PM_OPS	NULL
-#endif /* CONFIG_PM_SLEEP && CONFIG_ARM_PSCI_FW */
+static int sh_pfc_suspend_noirq(struct device *dev) { return 0; }
+static int sh_pfc_resume_noirq(struct device *dev) { return 0; }
+#endif	/* CONFIG_ARM_PSCI_FW */
+
+static DEFINE_NOIRQ_DEV_PM_OPS(sh_pfc_pm, sh_pfc_suspend_noirq, sh_pfc_resume_noirq);
 
 #ifdef DEBUG
 #define SH_PFC_MAX_REGS		300
@@ -1418,7 +1416,7 @@ static struct platform_driver sh_pfc_driver = {
 	.driver		= {
 		.name	= DRV_NAME,
 		.of_match_table = of_match_ptr(sh_pfc_of_table),
-		.pm     = DEV_PM_OPS,
+		.pm	= pm_sleep_ptr(&sh_pfc_pm),
 	},
 };
 
-- 
2.40.0.1.gaa8946217a0b


WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Balsam CHIHI <bchihi@baylibre.com>,
	Claudiu Beznea <claudiu.beznea@microchip.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Paul Cercueil <paul@crapouillou.net>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-pm@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Len Brown <len.brown@intel.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sean Wang <sean.wang@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Pavel Machek <pavel@ucw.cz>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Subject: [PATCH v2 09/10] pinctrl: renesas: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper
Date: Mon, 17 Jul 2023 20:28:20 +0300	[thread overview]
Message-ID: <20230717172821.62827-10-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20230717172821.62827-1-andriy.shevchenko@linux.intel.com>

Since pm.h provides a helper for system no-IRQ PM callbacks,
switch the driver to use it instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/pinctrl/renesas/core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/pinctrl/renesas/core.c b/drivers/pinctrl/renesas/core.c
index 0c8d081da6a8..34232b016960 100644
--- a/drivers/pinctrl/renesas/core.c
+++ b/drivers/pinctrl/renesas/core.c
@@ -649,7 +649,7 @@ static const struct of_device_id sh_pfc_of_table[] = {
 };
 #endif
 
-#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_ARM_PSCI_FW)
+#if defined(CONFIG_ARM_PSCI_FW)
 static void sh_pfc_nop_reg(struct sh_pfc *pfc, u32 reg, unsigned int idx)
 {
 }
@@ -732,15 +732,13 @@ static int sh_pfc_resume_noirq(struct device *dev)
 		sh_pfc_walk_regs(pfc, sh_pfc_restore_reg);
 	return 0;
 }
-
-static const struct dev_pm_ops sh_pfc_pm  = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(sh_pfc_suspend_noirq, sh_pfc_resume_noirq)
-};
-#define DEV_PM_OPS	&sh_pfc_pm
 #else
 static int sh_pfc_suspend_init(struct sh_pfc *pfc) { return 0; }
-#define DEV_PM_OPS	NULL
-#endif /* CONFIG_PM_SLEEP && CONFIG_ARM_PSCI_FW */
+static int sh_pfc_suspend_noirq(struct device *dev) { return 0; }
+static int sh_pfc_resume_noirq(struct device *dev) { return 0; }
+#endif	/* CONFIG_ARM_PSCI_FW */
+
+static DEFINE_NOIRQ_DEV_PM_OPS(sh_pfc_pm, sh_pfc_suspend_noirq, sh_pfc_resume_noirq);
 
 #ifdef DEBUG
 #define SH_PFC_MAX_REGS		300
@@ -1418,7 +1416,7 @@ static struct platform_driver sh_pfc_driver = {
 	.driver		= {
 		.name	= DRV_NAME,
 		.of_match_table = of_match_ptr(sh_pfc_of_table),
-		.pm     = DEV_PM_OPS,
+		.pm	= pm_sleep_ptr(&sh_pfc_pm),
 	},
 };
 
-- 
2.40.0.1.gaa8946217a0b


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-07-17 17:29 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 17:28 [PATCH v2 00/10] pinctrl: Provide NOIRQ PM helper and use it Andy Shevchenko
2023-07-17 17:28 ` Andy Shevchenko
2023-07-17 17:28 ` [PATCH v2 01/10] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:19   ` Paul Cercueil
2023-07-17 19:19     ` Paul Cercueil
2023-07-17 19:25     ` Andy Shevchenko
2023-07-18  9:55   ` Jonathan Cameron
2023-07-18  9:55     ` Jonathan Cameron
2023-07-18 10:01   ` Geert Uytterhoeven
2023-07-20 19:00   ` Rafael J. Wysocki
2023-07-17 17:28 ` [PATCH v2 02/10] pinctrl: baytrail: Make use of pm_ptr() Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:20   ` Paul Cercueil
2023-07-17 19:20     ` Paul Cercueil
2023-07-18  9:53   ` Jonathan Cameron
2023-07-18  9:53     ` Jonathan Cameron
2023-07-18 13:50     ` Andy Shevchenko
2023-07-18 13:50       ` Andy Shevchenko
2023-07-17 17:28 ` [PATCH v2 03/10] pinctrl: cherryview: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:21   ` Paul Cercueil
2023-07-17 19:21     ` Paul Cercueil
2023-07-17 19:27     ` Andy Shevchenko
2023-07-17 19:28       ` Paul Cercueil
2023-07-18  9:54   ` Jonathan Cameron
2023-07-18  9:54     ` Jonathan Cameron
2023-07-18 13:51     ` Andy Shevchenko
2023-07-18 13:51       ` Andy Shevchenko
2023-07-17 17:28 ` [PATCH v2 04/10] pinctrl: intel: " Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:02   ` Paul Cercueil
2023-07-17 19:02     ` Paul Cercueil
2023-07-17 19:33     ` Andy Shevchenko
2023-07-17 19:55       ` Paul Cercueil
2023-07-18 12:57         ` Andy Shevchenko
2023-07-18 13:55           ` Paul Cercueil
2023-07-18 10:04   ` Jonathan Cameron
2023-07-18 10:04     ` Jonathan Cameron
2023-07-18 13:53     ` Andy Shevchenko
2023-07-18 13:53       ` Andy Shevchenko
2023-07-19 10:37       ` Jonathan Cameron
2023-07-19 10:37         ` Jonathan Cameron
2023-07-17 17:28 ` [PATCH v2 05/10] pinctrl: lynxpoint: Make use of pm_ptr() Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:23   ` Paul Cercueil
2023-07-17 19:23     ` Paul Cercueil
2023-07-18 10:06   ` Jonathan Cameron
2023-07-18 10:06     ` Jonathan Cameron
2023-07-18 13:55     ` Andy Shevchenko
2023-07-18 13:55       ` Andy Shevchenko
2023-07-17 17:28 ` [PATCH v2 06/10] pinctrl: at91: Switch to use DEFINE_NOIRQ_DEV_PM_OPS() helper Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:25   ` Paul Cercueil
2023-07-17 19:25     ` Paul Cercueil
2023-07-17 19:35     ` Andy Shevchenko
2023-07-18 10:06   ` Jonathan Cameron
2023-07-18 10:06     ` Jonathan Cameron
2023-07-18 14:48   ` claudiu beznea
2023-07-18 14:48     ` claudiu beznea
2023-07-17 17:28 ` [PATCH v2 07/10] pinctrl: mediatek: " Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:06   ` Paul Cercueil
2023-07-17 19:06     ` Paul Cercueil
2023-07-17 19:36     ` Andy Shevchenko
2023-07-17 19:56       ` Paul Cercueil
2023-07-18 12:48         ` Andy Shevchenko
2023-07-18  9:47   ` AngeloGioacchino Del Regno
2023-07-18  9:47     ` AngeloGioacchino Del Regno
2023-07-18 12:46     ` Andy Shevchenko
2023-07-18 10:07   ` Jonathan Cameron
2023-07-18 10:07     ` Jonathan Cameron
2023-07-17 17:28 ` [PATCH v2 08/10] pinctrl: mvebu: " Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:26   ` Paul Cercueil
2023-07-17 19:26     ` Paul Cercueil
2023-07-18 10:08   ` Jonathan Cameron
2023-07-18 10:08     ` Jonathan Cameron
2023-07-17 17:28 ` Andy Shevchenko [this message]
2023-07-17 17:28   ` [PATCH v2 09/10] pinctrl: renesas: " Andy Shevchenko
2023-07-17 19:12   ` Paul Cercueil
2023-07-17 19:12     ` Paul Cercueil
2023-07-17 19:38     ` Andy Shevchenko
2023-07-17 19:57       ` Paul Cercueil
2023-07-18 10:05     ` Geert Uytterhoeven
2023-07-18 12:43       ` Andy Shevchenko
2023-07-18 10:01   ` Geert Uytterhoeven
2023-07-18 10:10   ` Jonathan Cameron
2023-07-18 10:10     ` Jonathan Cameron
2023-07-17 17:28 ` [PATCH v2 10/10] pinctrl: tegra: " Andy Shevchenko
2023-07-17 17:28   ` Andy Shevchenko
2023-07-17 19:14   ` Paul Cercueil
2023-07-17 19:14     ` Paul Cercueil
2023-07-17 19:39     ` Andy Shevchenko
2023-07-18  7:45     ` Thierry Reding
2023-07-18  8:42       ` Paul Cercueil
2023-07-18 11:41         ` Thierry Reding
2023-07-18 11:55           ` Paul Cercueil
2023-07-18 12:50             ` Andy Shevchenko
2023-07-18 13:20             ` Thierry Reding
2023-07-18 13:48               ` Paul Cercueil
2023-07-18 12:53         ` Andy Shevchenko
2023-07-18  7:46   ` Thierry Reding
2023-07-18 10:11   ` Jonathan Cameron
2023-07-18 10:11     ` Jonathan Cameron
2023-07-18 11:38     ` Thierry Reding
2023-07-18 11:38       ` Thierry Reding
2023-07-18 12:01       ` Paul Cercueil
2023-07-18 12:01         ` Paul Cercueil
2023-07-18 13:07         ` Thierry Reding
2023-07-18 13:07           ` Thierry Reding
2023-08-21 17:00 ` [PATCH v2 00/10] pinctrl: Provide NOIRQ PM helper and use it Andy Shevchenko
2023-08-21 17:00   ` 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=20230717172821.62827-10-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=bchihi@baylibre.com \
    --cc=claudiu.beznea@microchip.com \
    --cc=geert+renesas@glider.be \
    --cc=gregory.clement@bootlin.com \
    --cc=jonathanh@nvidia.com \
    --cc=len.brown@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=paul@crapouillou.net \
    --cc=pavel@ucw.cz \
    --cc=rafael@kernel.org \
    --cc=sean.wang@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.