public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 00/22] i2c: Use new PM macros
@ 2023-07-22 11:50 Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions Paul Cercueil
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Elie Morisse,
	Shyam Sundar S K, Ray Jui, Scott Branden, Kamal Dasu,
	Broadcom internal kernel review list, Florian Fainelli,
	Bartosz Golaszewski, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Jean Delvare, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Peter Korsgaard, Andrew Lunn, Vladimir Zapolskiy, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Wolfram Sang, Krzysztof Kozlowski,
	Alim Akhtar, Conghui Chen, Viresh Kumar, Peter Rosin,
	linux-arm-kernel, linux-arm-msm, linux-mediatek,
	linux-renesas-soc, linux-samsung-soc, virtualization

Hi Wolfram,

Here is a revised version of my patchset that converts the I2C drivers
to use the new PM macros.

Changes since V1 include:
- Previous patch [01/23] that updated the amd-mp2 driver has been
  dropped per Jonathan's request.
- [09/22]: Unfold _DEV_PM_OPS() macro
- [10/22]: Convert to use regular device PM instead of using
  platform_driver.{suspend,resume}. I figured it was OK to also change
  it to use the new PM macros and keep it in one single patch.
- [13/22]: Rewrap runtime PM line

Cheers,
-Paul

Paul Cercueil (22):
  i2c: au1550: Remove #ifdef guards for PM related functions
  i2c: iproc: Remove #ifdef guards for PM related functions
  i2c: brcmstb: Remove #ifdef guards for PM related functions
  i2c: davinci: Remove #ifdef guards for PM related functions
  i2c: designware: Remove #ifdef guards for PM related functions
  i2c: exynos5: Remove #ifdef guards for PM related functions
  i2c: hix5hd2: Remove #ifdef guards for PM related functions
  i2c: i801: Remove #ifdef guards for PM related functions
  i2c: img-scb: Remove #ifdef guards for PM related functions
  i2c: kempld: Convert to use regular device PM
  i2c: lpc2k: Remove #ifdef guards for PM related functions
  i2c: mt65xx: Remove #ifdef guards for PM related functions
  i2c: nomadik: Remove #ifdef guards for PM related functions
  i2c: ocores: Remove #ifdef guards for PM related functions
  i2c: pnx: Remove #ifdef guards for PM related functions
  i2c: pxa: Remove #ifdef guards for PM related functions
  i2c: qup: Remove #ifdef guards for PM related functions
  i2c: rcar: Remove #ifdef guards for PM related functions
  i2c: s3c2410: Remove #ifdef guards for PM related functions
  i2c: sh-mobile: Remove #ifdef guards for PM related functions
  i2c: virtio: Remove #ifdef guards for PM related functions
  i2c: mux: pca954x: Remove #ifdef guards for PM related functions

 drivers/i2c/busses/i2c-au1550.c             | 15 +++-----------
 drivers/i2c/busses/i2c-bcm-iproc.c          | 10 +---------
 drivers/i2c/busses/i2c-brcmstb.c            |  8 +++-----
 drivers/i2c/busses/i2c-davinci.c            | 12 +++--------
 drivers/i2c/busses/i2c-designware-platdrv.c | 22 ++++++---------------
 drivers/i2c/busses/i2c-exynos5.c            |  8 +++-----
 drivers/i2c/busses/i2c-hix5hd2.c            | 10 ++++------
 drivers/i2c/busses/i2c-i801.c               |  6 ++----
 drivers/i2c/busses/i2c-img-scb.c            | 10 +++-------
 drivers/i2c/busses/i2c-kempld.c             | 19 ++++++++----------
 drivers/i2c/busses/i2c-lpc2k.c              |  8 +-------
 drivers/i2c/busses/i2c-mt65xx.c             |  8 +++-----
 drivers/i2c/busses/i2c-nomadik.c            | 12 +++--------
 drivers/i2c/busses/i2c-ocores.c             | 10 +++-------
 drivers/i2c/busses/i2c-pnx.c                | 12 ++++-------
 drivers/i2c/busses/i2c-pxa.c                |  8 +-------
 drivers/i2c/busses/i2c-qup.c                | 16 ++++-----------
 drivers/i2c/busses/i2c-rcar.c               | 10 ++--------
 drivers/i2c/busses/i2c-s3c2410.c            | 14 +++----------
 drivers/i2c/busses/i2c-sh_mobile.c          | 12 +++--------
 drivers/i2c/busses/i2c-virtio.c             |  8 ++------
 drivers/i2c/muxes/i2c-mux-pca954x.c         |  6 ++----
 22 files changed, 67 insertions(+), 177 deletions(-)

-- 
2.40.1


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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 14:39   ` Florian Fainelli
  2023-07-22 11:50 ` [PATCH v2 03/22] i2c: brcmstb: " Paul Cercueil
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron, Ray Jui,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>

---
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-bcm-iproc.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c
index 2d8342fdc25d..8a3e2208475c 100644
--- a/drivers/i2c/busses/i2c-bcm-iproc.c
+++ b/drivers/i2c/busses/i2c-bcm-iproc.c
@@ -1125,8 +1125,6 @@ static void bcm_iproc_i2c_remove(struct platform_device *pdev)
 	bcm_iproc_i2c_enable_disable(iproc_i2c, false);
 }
 
-#ifdef CONFIG_PM_SLEEP
-
 static int bcm_iproc_i2c_suspend(struct device *dev)
 {
 	struct bcm_iproc_i2c_dev *iproc_i2c = dev_get_drvdata(dev);
@@ -1177,12 +1175,6 @@ static const struct dev_pm_ops bcm_iproc_i2c_pm_ops = {
 	.resume_early = &bcm_iproc_i2c_resume
 };
 
-#define BCM_IPROC_I2C_PM_OPS (&bcm_iproc_i2c_pm_ops)
-#else
-#define BCM_IPROC_I2C_PM_OPS NULL
-#endif /* CONFIG_PM_SLEEP */
-
-
 static int bcm_iproc_i2c_reg_slave(struct i2c_client *slave)
 {
 	struct bcm_iproc_i2c_dev *iproc_i2c = i2c_get_adapdata(slave->adapter);
@@ -1255,7 +1247,7 @@ static struct platform_driver bcm_iproc_i2c_driver = {
 	.driver = {
 		.name = "bcm-iproc-i2c",
 		.of_match_table = bcm_iproc_i2c_of_match,
-		.pm = BCM_IPROC_I2C_PM_OPS,
+		.pm = pm_sleep_ptr(&bcm_iproc_i2c_pm_ops),
 	},
 	.probe = bcm_iproc_i2c_probe,
 	.remove_new = bcm_iproc_i2c_remove,
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 03/22] i2c: brcmstb: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 14:39   ` Florian Fainelli
  2023-07-22 11:50 ` [PATCH v2 04/22] i2c: davinci: " Paul Cercueil
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Kamal Dasu, Broadcom internal kernel review list,
	Florian Fainelli, linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-brcmstb.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c
index cf92cbcb8c86..c778bcca95fe 100644
--- a/drivers/i2c/busses/i2c-brcmstb.c
+++ b/drivers/i2c/busses/i2c-brcmstb.c
@@ -697,7 +697,6 @@ static void brcmstb_i2c_remove(struct platform_device *pdev)
 	i2c_del_adapter(&dev->adapter);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int brcmstb_i2c_suspend(struct device *dev)
 {
 	struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev);
@@ -715,10 +714,9 @@ static int brcmstb_i2c_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
-static SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend,
-			 brcmstb_i2c_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(brcmstb_i2c_pm, brcmstb_i2c_suspend,
+				brcmstb_i2c_resume);
 
 static const struct of_device_id brcmstb_i2c_of_match[] = {
 	{.compatible = "brcm,brcmstb-i2c"},
@@ -732,7 +730,7 @@ static struct platform_driver brcmstb_i2c_driver = {
 	.driver = {
 		   .name = "brcmstb-i2c",
 		   .of_match_table = brcmstb_i2c_of_match,
-		   .pm = &brcmstb_i2c_pm,
+		   .pm = pm_sleep_ptr(&brcmstb_i2c_pm),
 		   },
 	.probe = brcmstb_i2c_probe,
 	.remove_new = brcmstb_i2c_remove,
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 04/22] i2c: davinci: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 03/22] i2c: brcmstb: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-27  7:40   ` Bartosz Golaszewski
  2023-07-22 11:50 ` [PATCH v2 06/22] i2c: exynos5: " Paul Cercueil
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Bartosz Golaszewski, linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Note that the behaviour is slightly different than before; the original
code wrapped the suspend/resume with #ifdef CONFIG_PM guards, which
resulted in these functions being compiled in but never used when
CONFIG_PM_SLEEP was disabled.

Now, those functions are only compiled in when CONFIG_PM_SLEEP is
enabled.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-davinci.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index 71b60778c643..52527189a7bf 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -902,7 +902,6 @@ static void davinci_i2c_remove(struct platform_device *pdev)
 	pm_runtime_disable(dev->dev);
 }
 
-#ifdef CONFIG_PM
 static int davinci_i2c_suspend(struct device *dev)
 {
 	struct davinci_i2c_dev *i2c_dev = dev_get_drvdata(dev);
@@ -926,15 +925,10 @@ static int davinci_i2c_resume(struct device *dev)
 static const struct dev_pm_ops davinci_i2c_pm = {
 	.suspend        = davinci_i2c_suspend,
 	.resume         = davinci_i2c_resume,
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-				      pm_runtime_force_resume)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+				  pm_runtime_force_resume)
 };
 
-#define davinci_i2c_pm_ops (&davinci_i2c_pm)
-#else
-#define davinci_i2c_pm_ops NULL
-#endif
-
 static const struct platform_device_id davinci_i2c_driver_ids[] = {
 	{ .name = "i2c_davinci", },
 	{ /* sentinel */ }
@@ -947,7 +941,7 @@ static struct platform_driver davinci_i2c_driver = {
 	.id_table	= davinci_i2c_driver_ids,
 	.driver		= {
 		.name	= "i2c_davinci",
-		.pm	= davinci_i2c_pm_ops,
+		.pm	= pm_sleep_ptr(&davinci_i2c_pm),
 		.of_match_table = davinci_i2c_of_match,
 	},
 };
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 06/22] i2c: exynos5: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (2 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 04/22] i2c: davinci: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: " Paul Cercueil
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
	linux-samsung-soc

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 drivers/i2c/busses/i2c-exynos5.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c
index f378cd479e55..5b201a326c13 100644
--- a/drivers/i2c/busses/i2c-exynos5.c
+++ b/drivers/i2c/busses/i2c-exynos5.c
@@ -892,7 +892,6 @@ static void exynos5_i2c_remove(struct platform_device *pdev)
 	clk_unprepare(i2c->pclk);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int exynos5_i2c_suspend_noirq(struct device *dev)
 {
 	struct exynos5_i2c *i2c = dev_get_drvdata(dev);
@@ -934,11 +933,10 @@ static int exynos5_i2c_resume_noirq(struct device *dev)
 	clk_disable_unprepare(i2c->pclk);
 	return ret;
 }
-#endif
 
 static const struct dev_pm_ops exynos5_i2c_dev_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos5_i2c_suspend_noirq,
-				      exynos5_i2c_resume_noirq)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(exynos5_i2c_suspend_noirq,
+				  exynos5_i2c_resume_noirq)
 };
 
 static struct platform_driver exynos5_i2c_driver = {
@@ -946,7 +944,7 @@ static struct platform_driver exynos5_i2c_driver = {
 	.remove_new	= exynos5_i2c_remove,
 	.driver		= {
 		.name	= "exynos5-hsi2c",
-		.pm	= &exynos5_i2c_dev_pm_ops,
+		.pm	= pm_sleep_ptr(&exynos5_i2c_dev_pm_ops),
 		.of_match_table = exynos5_i2c_match,
 	},
 };
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 11/22] i2c: lpc2k: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (3 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 06/22] i2c: exynos5: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: " Paul Cercueil
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Vladimir Zapolskiy, linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Note that the behaviour is slightly different than before; the original
code wrapped the suspend/resume with #ifdef CONFIG_PM guards, which
resulted in these functions being compiled in but never used when
CONFIG_PM_SLEEP was disabled.

Now, those functions are only compiled in when CONFIG_PM_SLEEP is
enabled.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-lpc2k.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-lpc2k.c b/drivers/i2c/busses/i2c-lpc2k.c
index 5c6d96554753..c61157f1409b 100644
--- a/drivers/i2c/busses/i2c-lpc2k.c
+++ b/drivers/i2c/busses/i2c-lpc2k.c
@@ -431,7 +431,6 @@ static void i2c_lpc2k_remove(struct platform_device *dev)
 	i2c_del_adapter(&i2c->adap);
 }
 
-#ifdef CONFIG_PM
 static int i2c_lpc2k_suspend(struct device *dev)
 {
 	struct lpc2k_i2c *i2c = dev_get_drvdata(dev);
@@ -456,11 +455,6 @@ static const struct dev_pm_ops i2c_lpc2k_dev_pm_ops = {
 	.resume_noirq = i2c_lpc2k_resume,
 };
 
-#define I2C_LPC2K_DEV_PM_OPS (&i2c_lpc2k_dev_pm_ops)
-#else
-#define I2C_LPC2K_DEV_PM_OPS NULL
-#endif
-
 static const struct of_device_id lpc2k_i2c_match[] = {
 	{ .compatible = "nxp,lpc1788-i2c" },
 	{},
@@ -472,7 +466,7 @@ static struct platform_driver i2c_lpc2k_driver = {
 	.remove_new = i2c_lpc2k_remove,
 	.driver	= {
 		.name		= "lpc2k-i2c",
-		.pm		= I2C_LPC2K_DEV_PM_OPS,
+		.pm		= pm_sleep_ptr(&i2c_lpc2k_dev_pm_ops),
 		.of_match_table	= lpc2k_i2c_match,
 	},
 };
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 12/22] i2c: mt65xx: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (4 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 13/22] i2c: nomadik: " Paul Cercueil
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Qii Wang, Matthias Brugger, AngeloGioacchino Del Regno,
	linux-arm-kernel, linux-mediatek

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Qii Wang <qii.wang@mediatek.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
---
 drivers/i2c/busses/i2c-mt65xx.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mt65xx.c b/drivers/i2c/busses/i2c-mt65xx.c
index 7ca3f2221ba6..21cc39e35cf6 100644
--- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -1514,7 +1514,6 @@ static void mtk_i2c_remove(struct platform_device *pdev)
 	clk_bulk_unprepare(I2C_MT65XX_CLK_MAX, i2c->clocks);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int mtk_i2c_suspend_noirq(struct device *dev)
 {
 	struct mtk_i2c *i2c = dev_get_drvdata(dev);
@@ -1544,11 +1543,10 @@ static int mtk_i2c_resume_noirq(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static const struct dev_pm_ops mtk_i2c_pm = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_i2c_suspend_noirq,
-				      mtk_i2c_resume_noirq)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_i2c_suspend_noirq,
+				  mtk_i2c_resume_noirq)
 };
 
 static struct platform_driver mtk_i2c_driver = {
@@ -1556,7 +1554,7 @@ static struct platform_driver mtk_i2c_driver = {
 	.remove_new = mtk_i2c_remove,
 	.driver = {
 		.name = I2C_DRV_NAME,
-		.pm = &mtk_i2c_pm,
+		.pm = pm_sleep_ptr(&mtk_i2c_pm),
 		.of_match_table = mtk_i2c_of_match,
 	},
 };
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 13/22] i2c: nomadik: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (5 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 11:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Linus Walleij, linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

---
v2: Rewrapped runtime PM line

---
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-nomadik.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
index 212f412f1c74..b10574d42b7a 100644
--- a/drivers/i2c/busses/i2c-nomadik.c
+++ b/drivers/i2c/busses/i2c-nomadik.c
@@ -873,7 +873,6 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
 	return IRQ_HANDLED;
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int nmk_i2c_suspend_late(struct device *dev)
 {
 	int ret;
@@ -890,9 +889,7 @@ static int nmk_i2c_resume_early(struct device *dev)
 {
 	return pm_runtime_force_resume(dev);
 }
-#endif
 
-#ifdef CONFIG_PM
 static int nmk_i2c_runtime_suspend(struct device *dev)
 {
 	struct amba_device *adev = to_amba_device(dev);
@@ -925,13 +922,10 @@ static int nmk_i2c_runtime_resume(struct device *dev)
 
 	return ret;
 }
-#endif
 
 static const struct dev_pm_ops nmk_i2c_pm = {
-	SET_LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
-	SET_RUNTIME_PM_OPS(nmk_i2c_runtime_suspend,
-			nmk_i2c_runtime_resume,
-			NULL)
+	LATE_SYSTEM_SLEEP_PM_OPS(nmk_i2c_suspend_late, nmk_i2c_resume_early)
+	RUNTIME_PM_OPS(nmk_i2c_runtime_suspend, nmk_i2c_runtime_resume, NULL)
 };
 
 static unsigned int nmk_i2c_functionality(struct i2c_adapter *adap)
@@ -1078,7 +1072,7 @@ static struct amba_driver nmk_i2c_driver = {
 	.drv = {
 		.owner = THIS_MODULE,
 		.name = DRIVER_NAME,
-		.pm = &nmk_i2c_pm,
+		.pm = pm_ptr(&nmk_i2c_pm),
 	},
 	.id_table = nmk_i2c_ids,
 	.probe = nmk_i2c_probe,
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 15/22] i2c: pnx: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (6 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 13/22] i2c: nomadik: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
  2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
  2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Vladimir Zapolskiy, linux-arm-kernel

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/i2c/busses/i2c-pnx.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 82400057f810..4ee7db512333 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -613,7 +613,6 @@ static const struct i2c_algorithm pnx_algorithm = {
 	.functionality = i2c_pnx_func,
 };
 
-#ifdef CONFIG_PM_SLEEP
 static int i2c_pnx_controller_suspend(struct device *dev)
 {
 	struct i2c_pnx_algo_data *alg_data = dev_get_drvdata(dev);
@@ -630,12 +629,9 @@ static int i2c_pnx_controller_resume(struct device *dev)
 	return clk_prepare_enable(alg_data->clk);
 }
 
-static SIMPLE_DEV_PM_OPS(i2c_pnx_pm,
-			 i2c_pnx_controller_suspend, i2c_pnx_controller_resume);
-#define PNX_I2C_PM	(&i2c_pnx_pm)
-#else
-#define PNX_I2C_PM	NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(i2c_pnx_pm,
+				i2c_pnx_controller_suspend,
+				i2c_pnx_controller_resume);
 
 static int i2c_pnx_probe(struct platform_device *pdev)
 {
@@ -763,7 +759,7 @@ static struct platform_driver i2c_pnx_driver = {
 	.driver = {
 		.name = "pnx-i2c",
 		.of_match_table = of_match_ptr(i2c_pnx_of_match),
-		.pm = PNX_I2C_PM,
+		.pm = pm_sleep_ptr(&i2c_pnx_pm),
 	},
 	.probe = i2c_pnx_probe,
 	.remove_new = i2c_pnx_remove,
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v2 19/22] i2c: s3c2410: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (7 preceding siblings ...)
  2023-07-22 11:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
  2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
  9 siblings, 0 replies; 15+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:53 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-kernel, Paul Cercueil, Jonathan Cameron,
	Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
	linux-samsung-soc

Use the new PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

---
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 drivers/i2c/busses/i2c-s3c2410.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 28f0e5c64f32..d23a9e7fcb48 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1125,7 +1125,6 @@ static void s3c24xx_i2c_remove(struct platform_device *pdev)
 	i2c_del_adapter(&i2c->adap);
 }
 
-#ifdef CONFIG_PM_SLEEP
 static int s3c24xx_i2c_suspend_noirq(struct device *dev)
 {
 	struct s3c24xx_i2c *i2c = dev_get_drvdata(dev);
@@ -1155,26 +1154,19 @@ static int s3c24xx_i2c_resume_noirq(struct device *dev)
 
 	return 0;
 }
-#endif
 
-#ifdef CONFIG_PM
 static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(s3c24xx_i2c_suspend_noirq,
-				      s3c24xx_i2c_resume_noirq)
+	NOIRQ_SYSTEM_SLEEP_PM_OPS(s3c24xx_i2c_suspend_noirq,
+				  s3c24xx_i2c_resume_noirq)
 };
 
-#define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops)
-#else
-#define S3C24XX_DEV_PM_OPS NULL
-#endif
-
 static struct platform_driver s3c24xx_i2c_driver = {
 	.probe		= s3c24xx_i2c_probe,
 	.remove_new	= s3c24xx_i2c_remove,
 	.id_table	= s3c24xx_driver_ids,
 	.driver		= {
 		.name	= "s3c-i2c",
-		.pm	= S3C24XX_DEV_PM_OPS,
+		.pm	= pm_sleep_ptr(&s3c24xx_i2c_dev_pm_ops),
 		.of_match_table = of_match_ptr(s3c24xx_i2c_match),
 	},
 };
-- 
2.40.1


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

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions Paul Cercueil
@ 2023-07-22 14:39   ` Florian Fainelli
  0 siblings, 0 replies; 15+ messages in thread
From: Florian Fainelli @ 2023-07-22 14:39 UTC (permalink / raw)
  To: Paul Cercueil, Wolfram Sang
  Cc: linux-i2c, linux-kernel, Jonathan Cameron, Ray Jui, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]



On 7/22/2023 4:50 AM, Paul Cercueil wrote:
> Use the new PM macros for the suspend and resume functions to be
> automatically dropped by the compiler when CONFIG_PM or
> CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.
> 
> This has the advantage of always compiling these functions in,
> independently of any Kconfig option. Thanks to that, bugs and other
> regressions are subsequently easier to catch.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> Acked-by: Ray Jui <ray.jui@broadcom.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 03/22] i2c: brcmstb: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 ` [PATCH v2 03/22] i2c: brcmstb: " Paul Cercueil
@ 2023-07-22 14:39   ` Florian Fainelli
  0 siblings, 0 replies; 15+ messages in thread
From: Florian Fainelli @ 2023-07-22 14:39 UTC (permalink / raw)
  To: Paul Cercueil, Wolfram Sang
  Cc: linux-i2c, linux-kernel, Jonathan Cameron, Kamal Dasu,
	Broadcom internal kernel review list, Florian Fainelli,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 619 bytes --]



On 7/22/2023 4:50 AM, Paul Cercueil wrote:
> Use the new PM macros for the suspend and resume functions to be
> automatically dropped by the compiler when CONFIG_PM or
> CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.
> 
> This has the advantage of always compiling these functions in,
> independently of any Kconfig option. Thanks to that, bugs and other
> regressions are subsequently easier to catch.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
-- 
Florian

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 04/22] i2c: davinci: Remove #ifdef guards for PM related functions
  2023-07-22 11:50 ` [PATCH v2 04/22] i2c: davinci: " Paul Cercueil
@ 2023-07-27  7:40   ` Bartosz Golaszewski
  0 siblings, 0 replies; 15+ messages in thread
From: Bartosz Golaszewski @ 2023-07-27  7:40 UTC (permalink / raw)
  To: Paul Cercueil
  Cc: Wolfram Sang, linux-i2c, linux-kernel, Jonathan Cameron,
	linux-arm-kernel

On Sat, Jul 22, 2023 at 1:51 PM Paul Cercueil <paul@crapouillou.net> wrote:
>
> Use the new PM macros for the suspend and resume functions to be
> automatically dropped by the compiler when CONFIG_PM or
> CONFIG_PM_SLEEP are disabled, without having to use #ifdef guards.
>
> This has the advantage of always compiling these functions in,
> independently of any Kconfig option. Thanks to that, bugs and other
> regressions are subsequently easier to catch.
>
> Note that the behaviour is slightly different than before; the original
> code wrapped the suspend/resume with #ifdef CONFIG_PM guards, which
> resulted in these functions being compiled in but never used when
> CONFIG_PM_SLEEP was disabled.
>
> Now, those functions are only compiled in when CONFIG_PM_SLEEP is
> enabled.
>
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> ---
> Cc: Bartosz Golaszewski <brgl@bgdev.pl>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  drivers/i2c/busses/i2c-davinci.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
> index 71b60778c643..52527189a7bf 100644
> --- a/drivers/i2c/busses/i2c-davinci.c
> +++ b/drivers/i2c/busses/i2c-davinci.c
> @@ -902,7 +902,6 @@ static void davinci_i2c_remove(struct platform_device *pdev)
>         pm_runtime_disable(dev->dev);
>  }
>
> -#ifdef CONFIG_PM
>  static int davinci_i2c_suspend(struct device *dev)
>  {
>         struct davinci_i2c_dev *i2c_dev = dev_get_drvdata(dev);
> @@ -926,15 +925,10 @@ static int davinci_i2c_resume(struct device *dev)
>  static const struct dev_pm_ops davinci_i2c_pm = {
>         .suspend        = davinci_i2c_suspend,
>         .resume         = davinci_i2c_resume,
> -       SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> -                                     pm_runtime_force_resume)
> +       NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> +                                 pm_runtime_force_resume)
>  };
>
> -#define davinci_i2c_pm_ops (&davinci_i2c_pm)
> -#else
> -#define davinci_i2c_pm_ops NULL
> -#endif
> -
>  static const struct platform_device_id davinci_i2c_driver_ids[] = {
>         { .name = "i2c_davinci", },
>         { /* sentinel */ }
> @@ -947,7 +941,7 @@ static struct platform_driver davinci_i2c_driver = {
>         .id_table       = davinci_i2c_driver_ids,
>         .driver         = {
>                 .name   = "i2c_davinci",
> -               .pm     = davinci_i2c_pm_ops,
> +               .pm     = pm_sleep_ptr(&davinci_i2c_pm),
>                 .of_match_table = davinci_i2c_of_match,
>         },
>  };
> --
> 2.40.1
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 00/22] i2c: Use new PM macros
  2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
                   ` (8 preceding siblings ...)
  2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
@ 2023-08-02 20:10 ` Andi Shyti
  2023-08-14 15:06   ` Wolfram Sang
  9 siblings, 1 reply; 15+ messages in thread
From: Andi Shyti @ 2023-08-02 20:10 UTC (permalink / raw)
  To: Wolfram Sang, Paul Cercueil
  Cc: Andi Shyti, linux-i2c, linux-kernel, Elie Morisse,
	Shyam Sundar S K, Ray Jui, Scott Branden, Kamal Dasu,
	Broadcom internal kernel review list, Florian Fainelli,
	Bartosz Golaszewski, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Jean Delvare, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Peter Korsgaard, Andrew Lunn, Vladimir Zapolskiy, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Wolfram Sang, Krzysztof Kozlowski,
	Alim Akhtar, Conghui Chen, Viresh Kumar, Peter Rosin,
	linux-arm-kernel, linux-arm-msm, linux-mediatek,
	linux-renesas-soc, linux-samsung-soc, virtualization

Hi

On Sat, 22 Jul 2023 13:50:24 +0200, Paul Cercueil wrote:
> Here is a revised version of my patchset that converts the I2C drivers
> to use the new PM macros.
> 
> Changes since V1 include:
> - Previous patch [01/23] that updated the amd-mp2 driver has been
>   dropped per Jonathan's request.
> - [09/22]: Unfold _DEV_PM_OPS() macro
> - [10/22]: Convert to use regular device PM instead of using
>   platform_driver.{suspend,resume}. I figured it was OK to also change
>   it to use the new PM macros and keep it in one single patch.
> - [13/22]: Rewrap runtime PM line
> 
> [...]

Applied to i2c/andi-for-next on

https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git

Please note that this patch may still undergo further evaluation
and the final decision will be made in collaboration with
Wolfram.

Thank you,
Andi

Patches applied
===============
[01/22] i2c: au1550: Remove #ifdef guards for PM related functions
        commit: 45a21c833d23848487963cb5d7eab27d748d2491
[02/22] i2c: iproc: Remove #ifdef guards for PM related functions
        commit: 679e955c54d83743184c06ffdfae62fcd406825b
[03/22] i2c: brcmstb: Remove #ifdef guards for PM related functions
        commit: 6079d3054ba1ffdd3b85fd0b006a7130762ef2b0
[04/22] i2c: davinci: Remove #ifdef guards for PM related functions
        commit: d81a91c4bbeac742284cf34edd6ccf121cd15ddb
[05/22] i2c: designware: Remove #ifdef guards for PM related functions
        commit: a6ca696a40af0f652dc79b480dbd54096672d2b5
[06/22] i2c: exynos5: Remove #ifdef guards for PM related functions
        commit: af65727a77cc3c90e6d01bad387c7c8f337af2ad
[07/22] i2c: hix5hd2: Remove #ifdef guards for PM related functions
        commit: 38373903059c7e82d141007fe311cba237a00e86
[08/22] i2c: i801: Remove #ifdef guards for PM related functions
        commit: 02d1b6a99b4c5b4f05343aea46da96a8f795836c
[09/22] i2c: img-scb: Remove #ifdef guards for PM related functions
        commit: d2150e96646ddbd9a0f7f193107e7c310cbbe455
[10/22] i2c: kempld: Convert to use regular device PM
        commit: abef155faf2bb13b7aca9c2df74d63bb81ebcd55
[11/22] i2c: lpc2k: Remove #ifdef guards for PM related functions
        commit: a31425a6d93571433aa254b1eb4262ed378a08c2
[12/22] i2c: mt65xx: Remove #ifdef guards for PM related functions
        commit: 910047e7741fbfe15a4fdb14de7a2c3d72284d9f
[13/22] i2c: nomadik: Remove #ifdef guards for PM related functions
        commit: d55ee2c2f6fe629e6f8eb5b9c824b2545bc9b5d2
[14/22] i2c: ocores: Remove #ifdef guards for PM related functions
        commit: f5e33fcc30fa1e4085d6381f50b4f35ca412d708
[15/22] i2c: pnx: Remove #ifdef guards for PM related functions
        commit: 1670c7091b2aead73c21f3f27bbac44943d739ae
[16/22] i2c: pxa: Remove #ifdef guards for PM related functions
        commit: 605b9efba5d6a290f7ea41bd23ee5a11c3bacfcf
[17/22] i2c: qup: Remove #ifdef guards for PM related functions
        commit: aeb96820afefc02b8ac287685c9f6c75e2e56b31
[18/22] i2c: rcar: Remove #ifdef guards for PM related functions
        commit: dd4e0c0b6f01cf1c42d8bbb4a29d657a44a64bc0
[19/22] i2c: s3c2410: Remove #ifdef guards for PM related functions
        commit: 386d59093b247b258c6257525ff7c74b8ee9e6ca
[20/22] i2c: sh-mobile: Remove #ifdef guards for PM related functions
        commit: 8a76e5af8731db81ab325e734c5acfc386d3139c
[21/22] i2c: virtio: Remove #ifdef guards for PM related functions
        commit: 61999179835e23f4b245258087bfc20cf3c082ee
[22/22] i2c: mux: pca954x: Remove #ifdef guards for PM related functions
        commit: 458405d7c5b85e60a1b68972d1432d20fa9dc557

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v2 00/22] i2c: Use new PM macros
  2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
@ 2023-08-14 15:06   ` Wolfram Sang
  0 siblings, 0 replies; 15+ messages in thread
From: Wolfram Sang @ 2023-08-14 15:06 UTC (permalink / raw)
  To: Andi Shyti
  Cc: Paul Cercueil, linux-i2c, linux-kernel, Elie Morisse,
	Shyam Sundar S K, Ray Jui, Scott Branden, Kamal Dasu,
	Broadcom internal kernel review list, Florian Fainelli,
	Bartosz Golaszewski, Jarkko Nikula, Andy Shevchenko,
	Mika Westerberg, Jan Dabros, Jean Delvare, Qii Wang,
	Matthias Brugger, AngeloGioacchino Del Regno, Linus Walleij,
	Peter Korsgaard, Andrew Lunn, Vladimir Zapolskiy, Andy Gross,
	Bjorn Andersson, Konrad Dybcio, Krzysztof Kozlowski, Alim Akhtar,
	Conghui Chen, Viresh Kumar, Peter Rosin, linux-arm-kernel,
	linux-arm-msm, linux-mediatek, linux-renesas-soc,
	linux-samsung-soc, virtualization


[-- Attachment #1.1: Type: text/plain, Size: 748 bytes --]

On Wed, Aug 02, 2023 at 10:10:34PM +0200, Andi Shyti wrote:
> Hi
> 
> On Sat, 22 Jul 2023 13:50:24 +0200, Paul Cercueil wrote:
> > Here is a revised version of my patchset that converts the I2C drivers
> > to use the new PM macros.
> > 
> > Changes since V1 include:
> > - Previous patch [01/23] that updated the amd-mp2 driver has been
> >   dropped per Jonathan's request.
> > - [09/22]: Unfold _DEV_PM_OPS() macro
> > - [10/22]: Convert to use regular device PM instead of using
> >   platform_driver.{suspend,resume}. I figured it was OK to also change
> >   it to use the new PM macros and keep it in one single patch.
> > - [13/22]: Rewrap runtime PM line
> > 
> > [...]

Applied to for-next (via Andi's branch), thanks!


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

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

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-08-14 15:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: Remove #ifdef guards for PM related functions Paul Cercueil
2023-07-22 14:39   ` Florian Fainelli
2023-07-22 11:50 ` [PATCH v2 03/22] i2c: brcmstb: " Paul Cercueil
2023-07-22 14:39   ` Florian Fainelli
2023-07-22 11:50 ` [PATCH v2 04/22] i2c: davinci: " Paul Cercueil
2023-07-27  7:40   ` Bartosz Golaszewski
2023-07-22 11:50 ` [PATCH v2 06/22] i2c: exynos5: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 13/22] i2c: nomadik: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
2023-08-14 15:06   ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox