* [PATCH v2 00/22] i2c: Use new PM macros
@ 2023-07-22 11:50 Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 01/22] i2c: au1550: Remove #ifdef guards for PM related functions Paul Cercueil
` (22 more replies)
0 siblings, 23 replies; 35+ 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v2 01/22] i2c: au1550: 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 11:50 ` [PATCH v2 02/22] i2c: iproc: " Paul Cercueil
` (21 subsequent siblings)
22 siblings, 0 replies; 35+ 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
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>
---
drivers/i2c/busses/i2c-au1550.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c
index e66c12ecf270..8e43f25c117e 100644
--- a/drivers/i2c/busses/i2c-au1550.c
+++ b/drivers/i2c/busses/i2c-au1550.c
@@ -342,7 +342,6 @@ static void i2c_au1550_remove(struct platform_device *pdev)
i2c_au1550_disable(priv);
}
-#ifdef CONFIG_PM
static int i2c_au1550_suspend(struct device *dev)
{
struct i2c_au1550_data *priv = dev_get_drvdata(dev);
@@ -361,21 +360,13 @@ static int i2c_au1550_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops i2c_au1550_pmops = {
- .suspend = i2c_au1550_suspend,
- .resume = i2c_au1550_resume,
-};
-
-#define AU1XPSC_SMBUS_PMOPS (&i2c_au1550_pmops)
-
-#else
-#define AU1XPSC_SMBUS_PMOPS NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(i2c_au1550_pmops,
+ i2c_au1550_suspend, i2c_au1550_resume);
static struct platform_driver au1xpsc_smbus_driver = {
.driver = {
.name = "au1xpsc_smbus",
- .pm = AU1XPSC_SMBUS_PMOPS,
+ .pm = pm_sleep_ptr(&i2c_au1550_pmops),
},
.probe = i2c_au1550_probe,
.remove_new = i2c_au1550_remove,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ 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 ` [PATCH v2 01/22] i2c: au1550: 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 03/22] i2c: brcmstb: " Paul Cercueil
` (20 subsequent siblings)
22 siblings, 1 reply; 35+ 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
^ permalink raw reply related [flat|nested] 35+ 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 01/22] i2c: au1550: Remove #ifdef guards for PM related functions Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: " 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
` (19 subsequent siblings)
22 siblings, 1 reply; 35+ 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
^ permalink raw reply related [flat|nested] 35+ 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
` (2 preceding siblings ...)
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 05/22] i2c: designware: " Paul Cercueil
` (18 subsequent siblings)
22 siblings, 1 reply; 35+ 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
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 05/22] i2c: designware: 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 04/22] i2c: davinci: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-27 10:19 ` Jarkko Nikula
2023-07-22 11:50 ` [PATCH v2 06/22] i2c: exynos5: " Paul Cercueil
` (17 subsequent siblings)
22 siblings, 1 reply; 35+ 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,
Andy Shevchenko, Jarkko Nikula, Mika Westerberg, Jan Dabros
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Jan Dabros <jsd@semihalf.com>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 22 ++++++---------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 970c1c3b0402..855b698e99c0 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -418,7 +418,6 @@ static void dw_i2c_plat_remove(struct platform_device *pdev)
reset_control_assert(dev->rst);
}
-#ifdef CONFIG_PM_SLEEP
static int dw_i2c_plat_prepare(struct device *dev)
{
/*
@@ -429,11 +428,7 @@ static int dw_i2c_plat_prepare(struct device *dev)
*/
return !has_acpi_companion(dev);
}
-#else
-#define dw_i2c_plat_prepare NULL
-#endif
-#ifdef CONFIG_PM
static int dw_i2c_plat_runtime_suspend(struct device *dev)
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
@@ -447,7 +442,7 @@ static int dw_i2c_plat_runtime_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused dw_i2c_plat_suspend(struct device *dev)
+static int dw_i2c_plat_suspend(struct device *dev)
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
@@ -468,7 +463,7 @@ static int dw_i2c_plat_runtime_resume(struct device *dev)
return 0;
}
-static int __maybe_unused dw_i2c_plat_resume(struct device *dev)
+static int dw_i2c_plat_resume(struct device *dev)
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
@@ -479,16 +474,11 @@ static int __maybe_unused dw_i2c_plat_resume(struct device *dev)
}
static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
- .prepare = dw_i2c_plat_prepare,
- SET_LATE_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
- SET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
+ .prepare = pm_sleep_ptr(dw_i2c_plat_prepare),
+ LATE_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
+ RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
};
-#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops)
-#else
-#define DW_I2C_DEV_PMOPS NULL
-#endif
-
/* Work with hotplug and coldplug */
MODULE_ALIAS("platform:i2c_designware");
@@ -499,7 +489,7 @@ static struct platform_driver dw_i2c_driver = {
.name = "i2c_designware",
.of_match_table = of_match_ptr(dw_i2c_of_match),
.acpi_match_table = ACPI_PTR(dw_i2c_acpi_match),
- .pm = DW_I2C_DEV_PMOPS,
+ .pm = pm_ptr(&dw_i2c_dev_pm_ops),
},
};
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ 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
` (4 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 05/22] i2c: designware: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 07/22] i2c: hix5hd2: " Paul Cercueil
` (16 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 07/22] i2c: hix5hd2: 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 06/22] i2c: exynos5: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 08/22] i2c: i801: " Paul Cercueil
` (15 subsequent siblings)
22 siblings, 0 replies; 35+ 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
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 this driver should probably use the
DEFINE_RUNTIME_DEV_PM_OPS() macro, which would allow the devices to be
runtime-suspended on system suspend.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
drivers/i2c/busses/i2c-hix5hd2.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
index 784a5f56eb76..8e75515c3ca4 100644
--- a/drivers/i2c/busses/i2c-hix5hd2.c
+++ b/drivers/i2c/busses/i2c-hix5hd2.c
@@ -475,7 +475,6 @@ static void hix5hd2_i2c_remove(struct platform_device *pdev)
pm_runtime_set_suspended(priv->dev);
}
-#ifdef CONFIG_PM
static int hix5hd2_i2c_runtime_suspend(struct device *dev)
{
struct hix5hd2_i2c_priv *priv = dev_get_drvdata(dev);
@@ -494,12 +493,11 @@ static int hix5hd2_i2c_runtime_resume(struct device *dev)
return 0;
}
-#endif
static const struct dev_pm_ops hix5hd2_i2c_pm_ops = {
- SET_RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
- hix5hd2_i2c_runtime_resume,
- NULL)
+ RUNTIME_PM_OPS(hix5hd2_i2c_runtime_suspend,
+ hix5hd2_i2c_runtime_resume,
+ NULL)
};
static const struct of_device_id hix5hd2_i2c_match[] = {
@@ -513,7 +511,7 @@ static struct platform_driver hix5hd2_i2c_driver = {
.remove_new = hix5hd2_i2c_remove,
.driver = {
.name = "hix5hd2-i2c",
- .pm = &hix5hd2_i2c_pm_ops,
+ .pm = pm_ptr(&hix5hd2_i2c_pm_ops),
.of_match_table = hix5hd2_i2c_match,
},
};
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 08/22] i2c: i801: 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 07/22] i2c: hix5hd2: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-08-10 15:25 ` Jean Delvare
2023-07-22 11:50 ` [PATCH v2 09/22] i2c: img-scb: " Paul Cercueil
` (14 subsequent siblings)
22 siblings, 1 reply; 35+ 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,
Jean Delvare
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: Jean Delvare <jdelvare@suse.com>
---
drivers/i2c/busses/i2c-i801.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 943b8e6d026d..73ae06432133 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -1808,7 +1808,6 @@ static void i801_shutdown(struct pci_dev *dev)
pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg);
}
-#ifdef CONFIG_PM_SLEEP
static int i801_suspend(struct device *dev)
{
struct i801_priv *priv = dev_get_drvdata(dev);
@@ -1827,9 +1826,8 @@ static int i801_resume(struct device *dev)
return 0;
}
-#endif
-static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
static struct pci_driver i801_driver = {
.name = DRV_NAME,
@@ -1838,7 +1836,7 @@ static struct pci_driver i801_driver = {
.remove = i801_remove,
.shutdown = i801_shutdown,
.driver = {
- .pm = &i801_pm_ops,
+ .pm = pm_sleep_ptr(&i801_pm_ops),
.probe_type = PROBE_PREFER_ASYNCHRONOUS,
},
};
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 09/22] i2c: img-scb: 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 08/22] i2c: i801: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-28 12:18 ` Andi Shyti
2023-07-22 11:50 ` [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM Paul Cercueil
` (13 subsequent siblings)
22 siblings, 1 reply; 35+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Paul Cercueil
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>
---
v2: Unfold _DEFINE_DEV_PM_OPS() macro
---
drivers/i2c/busses/i2c-img-scb.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c
index 66ba36949ab5..f9d4bfef511c 100644
--- a/drivers/i2c/busses/i2c-img-scb.c
+++ b/drivers/i2c/busses/i2c-img-scb.c
@@ -1454,7 +1454,6 @@ static int img_i2c_runtime_resume(struct device *dev)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int img_i2c_suspend(struct device *dev)
{
struct img_i2c *i2c = dev_get_drvdata(dev);
@@ -1482,13 +1481,10 @@ static int img_i2c_resume(struct device *dev)
return 0;
}
-#endif /* CONFIG_PM_SLEEP */
static const struct dev_pm_ops img_i2c_pm = {
- SET_RUNTIME_PM_OPS(img_i2c_runtime_suspend,
- img_i2c_runtime_resume,
- NULL)
- SET_SYSTEM_SLEEP_PM_OPS(img_i2c_suspend, img_i2c_resume)
+ RUNTIME_PM_OPS(img_i2c_runtime_suspend, img_i2c_runtime_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(img_i2c_suspend, img_i2c_resume)
};
static const struct of_device_id img_scb_i2c_match[] = {
@@ -1501,7 +1497,7 @@ static struct platform_driver img_scb_i2c_driver = {
.driver = {
.name = "img-i2c-scb",
.of_match_table = img_scb_i2c_match,
- .pm = &img_i2c_pm,
+ .pm = pm_ptr(&img_i2c_pm),
},
.probe = img_i2c_probe,
.remove_new = img_i2c_remove,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (8 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 09/22] i2c: img-scb: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-28 12:19 ` Andi Shyti
2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: Remove #ifdef guards for PM related functions Paul Cercueil
` (12 subsequent siblings)
22 siblings, 1 reply; 35+ messages in thread
From: Paul Cercueil @ 2023-07-22 11:50 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-kernel, Paul Cercueil
Provide PM callbacks through platform_driver.driver.pm instead of
platform_driver.{suspend,resume} as any good-behaved driver should do.
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>
---
v2: Convert to use regular device PM instead of using
platform_driver.{suspend,resume}
---
drivers/i2c/busses/i2c-kempld.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c-kempld.c b/drivers/i2c/busses/i2c-kempld.c
index 281058e3ea46..e01d75308288 100644
--- a/drivers/i2c/busses/i2c-kempld.c
+++ b/drivers/i2c/busses/i2c-kempld.c
@@ -350,10 +350,9 @@ static void kempld_i2c_remove(struct platform_device *pdev)
i2c_del_adapter(&i2c->adap);
}
-#ifdef CONFIG_PM
-static int kempld_i2c_suspend(struct platform_device *pdev, pm_message_t state)
+static int kempld_i2c_suspend(struct device *dev)
{
- struct kempld_i2c_data *i2c = platform_get_drvdata(pdev);
+ struct kempld_i2c_data *i2c = dev_get_drvdata(dev);
struct kempld_device_data *pld = i2c->pld;
u8 ctrl;
@@ -366,9 +365,9 @@ static int kempld_i2c_suspend(struct platform_device *pdev, pm_message_t state)
return 0;
}
-static int kempld_i2c_resume(struct platform_device *pdev)
+static int kempld_i2c_resume(struct device *dev)
{
- struct kempld_i2c_data *i2c = platform_get_drvdata(pdev);
+ struct kempld_i2c_data *i2c = dev_get_drvdata(dev);
struct kempld_device_data *pld = i2c->pld;
kempld_get_mutex(pld);
@@ -377,19 +376,17 @@ static int kempld_i2c_resume(struct platform_device *pdev)
return 0;
}
-#else
-#define kempld_i2c_suspend NULL
-#define kempld_i2c_resume NULL
-#endif
+
+static DEFINE_SIMPLE_DEV_PM_OPS(kempld_i2c_pm_ops,
+ kempld_i2c_suspend, kempld_i2c_resume);
static struct platform_driver kempld_i2c_driver = {
.driver = {
.name = "kempld-i2c",
+ .pm = pm_sleep_ptr(&kempld_i2c_pm_ops),
},
.probe = kempld_i2c_probe,
.remove_new = kempld_i2c_remove,
- .suspend = kempld_i2c_suspend,
- .resume = kempld_i2c_resume,
};
module_platform_driver(kempld_i2c_driver);
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ 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
` (9 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: " Paul Cercueil
` (11 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ 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
` (10 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: Remove #ifdef guards for PM related functions Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 13/22] i2c: nomadik: " Paul Cercueil
` (10 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ 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
` (11 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 14/22] i2c: ocores: " Paul Cercueil
` (9 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 14/22] i2c: ocores: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (12 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:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
` (8 subsequent siblings)
22 siblings, 0 replies; 35+ 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,
Peter Korsgaard, Andrew Lunn
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: Peter Korsgaard <peter@korsgaard.com>
Cc: Andrew Lunn <andrew@lunn.ch>
---
drivers/i2c/busses/i2c-ocores.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index 4ac77e57bbbf..041a76f71a49 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -743,7 +743,6 @@ static void ocores_i2c_remove(struct platform_device *pdev)
i2c_del_adapter(&i2c->adap);
}
-#ifdef CONFIG_PM_SLEEP
static int ocores_i2c_suspend(struct device *dev)
{
struct ocores_i2c *i2c = dev_get_drvdata(dev);
@@ -772,11 +771,8 @@ static int ocores_i2c_resume(struct device *dev)
return ocores_init(dev, i2c);
}
-static SIMPLE_DEV_PM_OPS(ocores_i2c_pm, ocores_i2c_suspend, ocores_i2c_resume);
-#define OCORES_I2C_PM (&ocores_i2c_pm)
-#else
-#define OCORES_I2C_PM NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(ocores_i2c_pm,
+ ocores_i2c_suspend, ocores_i2c_resume);
static struct platform_driver ocores_i2c_driver = {
.probe = ocores_i2c_probe,
@@ -784,7 +780,7 @@ static struct platform_driver ocores_i2c_driver = {
.driver = {
.name = "ocores-i2c",
.of_match_table = ocores_i2c_match,
- .pm = OCORES_I2C_PM,
+ .pm = pm_sleep_ptr(&ocores_i2c_pm),
},
};
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ 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
` (13 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 14/22] i2c: ocores: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 16/22] i2c: pxa: " Paul Cercueil
` (7 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 16/22] i2c: pxa: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (14 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
@ 2023-07-22 11:50 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 17/22] i2c: qup: " Paul Cercueil
` (6 subsequent siblings)
22 siblings, 0 replies; 35+ 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
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>
---
drivers/i2c/busses/i2c-pxa.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 937f7eebe906..65a18d73be5c 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1491,7 +1491,6 @@ static void i2c_pxa_remove(struct platform_device *dev)
clk_disable_unprepare(i2c->clk);
}
-#ifdef CONFIG_PM
static int i2c_pxa_suspend_noirq(struct device *dev)
{
struct pxa_i2c *i2c = dev_get_drvdata(dev);
@@ -1516,17 +1515,12 @@ static const struct dev_pm_ops i2c_pxa_dev_pm_ops = {
.resume_noirq = i2c_pxa_resume_noirq,
};
-#define I2C_PXA_DEV_PM_OPS (&i2c_pxa_dev_pm_ops)
-#else
-#define I2C_PXA_DEV_PM_OPS NULL
-#endif
-
static struct platform_driver i2c_pxa_driver = {
.probe = i2c_pxa_probe,
.remove_new = i2c_pxa_remove,
.driver = {
.name = "pxa2xx-i2c",
- .pm = I2C_PXA_DEV_PM_OPS,
+ .pm = pm_sleep_ptr(&i2c_pxa_dev_pm_ops),
.of_match_table = i2c_pxa_dt_ids,
},
.id_table = i2c_pxa_id_table,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 17/22] i2c: qup: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (15 preceding siblings ...)
2023-07-22 11:50 ` [PATCH v2 16/22] i2c: pxa: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 18/22] i2c: rcar: " Paul Cercueil
` (5 subsequent siblings)
22 siblings, 0 replies; 35+ 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,
Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-arm-msm
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 driver should probably use the DEFINE_RUNTIME_DEV_PM_OPS()
macro, as the system suspend/resume callbacks seem to not do anything
more than triggering the runtime-PM states.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
---
drivers/i2c/busses/i2c-qup.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index ae90170023b0..598102d16677 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -1927,7 +1927,6 @@ static void qup_i2c_remove(struct platform_device *pdev)
pm_runtime_set_suspended(qup->dev);
}
-#ifdef CONFIG_PM
static int qup_i2c_pm_suspend_runtime(struct device *device)
{
struct qup_i2c_dev *qup = dev_get_drvdata(device);
@@ -1945,9 +1944,7 @@ static int qup_i2c_pm_resume_runtime(struct device *device)
qup_i2c_enable_clocks(qup);
return 0;
}
-#endif
-#ifdef CONFIG_PM_SLEEP
static int qup_i2c_suspend(struct device *device)
{
if (!pm_runtime_suspended(device))
@@ -1962,16 +1959,11 @@ static int qup_i2c_resume(struct device *device)
pm_request_autosuspend(device);
return 0;
}
-#endif
static const struct dev_pm_ops qup_i2c_qup_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(
- qup_i2c_suspend,
- qup_i2c_resume)
- SET_RUNTIME_PM_OPS(
- qup_i2c_pm_suspend_runtime,
- qup_i2c_pm_resume_runtime,
- NULL)
+ SYSTEM_SLEEP_PM_OPS(qup_i2c_suspend, qup_i2c_resume)
+ RUNTIME_PM_OPS(qup_i2c_pm_suspend_runtime,
+ qup_i2c_pm_resume_runtime, NULL)
};
static const struct of_device_id qup_i2c_dt_match[] = {
@@ -1987,7 +1979,7 @@ static struct platform_driver qup_i2c_driver = {
.remove_new = qup_i2c_remove,
.driver = {
.name = "i2c_qup",
- .pm = &qup_i2c_qup_pm_ops,
+ .pm = pm_ptr(&qup_i2c_qup_pm_ops),
.of_match_table = qup_i2c_dt_match,
.acpi_match_table = ACPI_PTR(qup_i2c_acpi_match),
},
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 18/22] i2c: rcar: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (16 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 17/22] i2c: qup: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
` (4 subsequent siblings)
22 siblings, 0 replies; 35+ 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,
Geert Uytterhoeven, Wolfram Sang, linux-renesas-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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org
---
drivers/i2c/busses/i2c-rcar.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 2d9c37410ebd..6b7f0f27d0c3 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -1169,7 +1169,6 @@ static void rcar_i2c_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
}
-#ifdef CONFIG_PM_SLEEP
static int rcar_i2c_suspend(struct device *dev)
{
struct rcar_i2c_priv *priv = dev_get_drvdata(dev);
@@ -1187,19 +1186,14 @@ static int rcar_i2c_resume(struct device *dev)
}
static const struct dev_pm_ops rcar_i2c_pm_ops = {
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(rcar_i2c_suspend, rcar_i2c_resume)
+ NOIRQ_SYSTEM_SLEEP_PM_OPS(rcar_i2c_suspend, rcar_i2c_resume)
};
-#define DEV_PM_OPS (&rcar_i2c_pm_ops)
-#else
-#define DEV_PM_OPS NULL
-#endif /* CONFIG_PM_SLEEP */
-
static struct platform_driver rcar_i2c_driver = {
.driver = {
.name = "i2c-rcar",
.of_match_table = rcar_i2c_dt_ids,
- .pm = DEV_PM_OPS,
+ .pm = pm_sleep_ptr(&rcar_i2c_pm_ops),
},
.probe = rcar_i2c_probe,
.remove_new = rcar_i2c_remove,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ 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
` (17 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 18/22] i2c: rcar: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 20/22] i2c: sh-mobile: " Paul Cercueil
` (3 subsequent siblings)
22 siblings, 0 replies; 35+ 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
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 20/22] i2c: sh-mobile: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (18 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " Paul Cercueil
` (2 subsequent siblings)
22 siblings, 0 replies; 35+ 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,
Geert Uytterhoeven, Wolfram Sang, linux-renesas-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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-renesas-soc@vger.kernel.org
---
drivers/i2c/busses/i2c-sh_mobile.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 21717b943a9e..324407196a10 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -965,7 +965,6 @@ static void sh_mobile_i2c_remove(struct platform_device *dev)
pm_runtime_disable(&dev->dev);
}
-#ifdef CONFIG_PM_SLEEP
static int sh_mobile_i2c_suspend(struct device *dev)
{
struct sh_mobile_i2c_data *pd = dev_get_drvdata(dev);
@@ -983,20 +982,15 @@ static int sh_mobile_i2c_resume(struct device *dev)
}
static const struct dev_pm_ops sh_mobile_i2c_pm_ops = {
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(sh_mobile_i2c_suspend,
- sh_mobile_i2c_resume)
+ NOIRQ_SYSTEM_SLEEP_PM_OPS(sh_mobile_i2c_suspend,
+ sh_mobile_i2c_resume)
};
-#define DEV_PM_OPS (&sh_mobile_i2c_pm_ops)
-#else
-#define DEV_PM_OPS NULL
-#endif /* CONFIG_PM_SLEEP */
-
static struct platform_driver sh_mobile_i2c_driver = {
.driver = {
.name = "i2c-sh_mobile",
.of_match_table = sh_mobile_i2c_dt_ids,
- .pm = DEV_PM_OPS,
+ .pm = pm_sleep_ptr(&sh_mobile_i2c_pm_ops),
},
.probe = sh_mobile_i2c_probe,
.remove_new = sh_mobile_i2c_remove,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (19 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 20/22] i2c: sh-mobile: " Paul Cercueil
@ 2023-07-22 11:53 ` Paul Cercueil
2023-07-22 13:55 ` kernel test robot
` (2 more replies)
2023-07-22 11:53 ` [PATCH v2 22/22] i2c: mux: pca954x: " Paul Cercueil
2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
22 siblings, 3 replies; 35+ 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,
Viresh Kumar, Conghui Chen, virtualization
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: Viresh Kumar <viresh.kumar@linaro.org>
---
Cc: Conghui Chen <conghui.chen@intel.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: virtualization@lists.linux-foundation.org
---
drivers/i2c/busses/i2c-virtio.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-virtio.c b/drivers/i2c/busses/i2c-virtio.c
index 4b9536f50800..c60ae531ba57 100644
--- a/drivers/i2c/busses/i2c-virtio.c
+++ b/drivers/i2c/busses/i2c-virtio.c
@@ -243,7 +243,6 @@ static struct virtio_device_id id_table[] = {
};
MODULE_DEVICE_TABLE(virtio, id_table);
-#ifdef CONFIG_PM_SLEEP
static int virtio_i2c_freeze(struct virtio_device *vdev)
{
virtio_i2c_del_vqs(vdev);
@@ -254,7 +253,6 @@ static int virtio_i2c_restore(struct virtio_device *vdev)
{
return virtio_i2c_setup_vqs(vdev->priv);
}
-#endif
static const unsigned int features[] = {
VIRTIO_I2C_F_ZERO_LENGTH_REQUEST,
@@ -269,10 +267,8 @@ static struct virtio_driver virtio_i2c_driver = {
.driver = {
.name = "i2c_virtio",
},
-#ifdef CONFIG_PM_SLEEP
- .freeze = virtio_i2c_freeze,
- .restore = virtio_i2c_restore,
-#endif
+ .freeze = pm_sleep_ptr(virtio_i2c_freeze),
+ .restore = pm_sleep_ptr(virtio_i2c_restore),
};
module_virtio_driver(virtio_i2c_driver);
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH v2 22/22] i2c: mux: pca954x: Remove #ifdef guards for PM related functions
2023-07-22 11:50 [PATCH v2 00/22] i2c: Use new PM macros Paul Cercueil
` (20 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " 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
22 siblings, 0 replies; 35+ 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,
Peter Rosin
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: Peter Rosin <peda@axentia.se>
---
drivers/i2c/muxes/i2c-mux-pca954x.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 0ccee2ae5720..6965bf4c2348 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -530,7 +530,6 @@ static void pca954x_remove(struct i2c_client *client)
pca954x_cleanup(muxc);
}
-#ifdef CONFIG_PM_SLEEP
static int pca954x_resume(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
@@ -544,14 +543,13 @@ static int pca954x_resume(struct device *dev)
return ret;
}
-#endif
-static SIMPLE_DEV_PM_OPS(pca954x_pm, NULL, pca954x_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(pca954x_pm, NULL, pca954x_resume);
static struct i2c_driver pca954x_driver = {
.driver = {
.name = "pca954x",
- .pm = &pca954x_pm,
+ .pm = pm_sleep_ptr(&pca954x_pm),
.of_match_table = pca954x_of_match,
},
.probe = pca954x_probe,
--
2.40.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " Paul Cercueil
@ 2023-07-22 13:55 ` kernel test robot
2023-07-22 15:07 ` kernel test robot
2023-07-22 19:06 ` Paul Cercueil
2 siblings, 0 replies; 35+ messages in thread
From: kernel test robot @ 2023-07-22 13:55 UTC (permalink / raw)
To: Paul Cercueil, Wolfram Sang
Cc: oe-kbuild-all, linux-i2c, linux-kernel, Paul Cercueil,
Jonathan Cameron, Viresh Kumar, Conghui Chen, virtualization
Hi Paul,
kernel test robot noticed the following build errors:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on brgl/gpio/for-next krzk/for-next linus/master v6.5-rc2 next-20230721]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Paul-Cercueil/i2c-au1550-Remove-ifdef-guards-for-PM-related-functions/20230722-200209
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link: https://lore.kernel.org/r/20230722115310.27681-5-paul%40crapouillou.net
patch subject: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
config: nios2-randconfig-r005-20230722 (https://download.01.org/0day-ci/archive/20230722/202307222129.Q7WjPurG-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230722/202307222129.Q7WjPurG-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307222129.Q7WjPurG-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-virtio.c:270:10: error: 'struct virtio_driver' has no member named 'freeze'
270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze),
| ^~~~~~
In file included from include/linux/cpumask.h:10,
from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/spinlock.h:63,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:13,
from drivers/i2c/busses/i2c-virtio.c:11:
>> include/linux/kernel.h:58:33: error: initialization of 'const struct virtio_device_id *' from incompatible pointer type 'int (*)(struct virtio_device *)' [-Werror=incompatible-pointer-types]
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr'
270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.id_table')
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr'
270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: warning: initialized field overwritten [-Woverride-init]
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr'
270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.id_table')
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:270:35: note: in expansion of macro 'pm_sleep_ptr'
270 | .freeze = pm_sleep_ptr(virtio_i2c_freeze),
| ^~~~~~~~~~~~
>> drivers/i2c/busses/i2c-virtio.c:271:10: error: 'struct virtio_driver' has no member named 'restore'
271 | .restore = pm_sleep_ptr(virtio_i2c_restore),
| ^~~~~~~
>> include/linux/kernel.h:58:33: error: initialization of 'const unsigned int *' from incompatible pointer type 'int (*)(struct virtio_device *)' [-Werror=incompatible-pointer-types]
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr'
271 | .restore = pm_sleep_ptr(virtio_i2c_restore),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.feature_table')
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr'
271 | .restore = pm_sleep_ptr(virtio_i2c_restore),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: warning: initialized field overwritten [-Woverride-init]
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr'
271 | .restore = pm_sleep_ptr(virtio_i2c_restore),
| ^~~~~~~~~~~~
include/linux/kernel.h:58:33: note: (near initialization for 'virtio_i2c_driver.feature_table')
58 | #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
| ^
include/linux/pm.h:452:28: note: in expansion of macro 'PTR_IF'
452 | #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr))
| ^~~~~~
drivers/i2c/busses/i2c-virtio.c:271:35: note: in expansion of macro 'pm_sleep_ptr'
271 | .restore = pm_sleep_ptr(virtio_i2c_restore),
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +270 drivers/i2c/busses/i2c-virtio.c
260
261 static struct virtio_driver virtio_i2c_driver = {
262 .feature_table = features,
263 .feature_table_size = ARRAY_SIZE(features),
264 .id_table = id_table,
265 .probe = virtio_i2c_probe,
266 .remove = virtio_i2c_remove,
267 .driver = {
268 .name = "i2c_virtio",
269 },
> 270 .freeze = pm_sleep_ptr(virtio_i2c_freeze),
> 271 .restore = pm_sleep_ptr(virtio_i2c_restore),
272 };
273 module_virtio_driver(virtio_i2c_driver);
274
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 35+ 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: " Paul Cercueil
@ 2023-07-22 14:39 ` Florian Fainelli
0 siblings, 0 replies; 35+ 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: 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 #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply [flat|nested] 35+ 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; 35+ 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: 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 #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " Paul Cercueil
2023-07-22 13:55 ` kernel test robot
@ 2023-07-22 15:07 ` kernel test robot
2023-07-22 19:06 ` Paul Cercueil
2 siblings, 0 replies; 35+ messages in thread
From: kernel test robot @ 2023-07-22 15:07 UTC (permalink / raw)
To: Paul Cercueil, Wolfram Sang
Cc: llvm, oe-kbuild-all, linux-i2c, linux-kernel, Paul Cercueil,
Jonathan Cameron, Viresh Kumar, Conghui Chen, virtualization
Hi Paul,
kernel test robot noticed the following build errors:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on brgl/gpio/for-next krzk/for-next linus/master v6.5-rc2 next-20230721]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Paul-Cercueil/i2c-au1550-Remove-ifdef-guards-for-PM-related-functions/20230722-200209
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link: https://lore.kernel.org/r/20230722115310.27681-5-paul%40crapouillou.net
patch subject: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
config: i386-randconfig-r015-20230722 (https://download.01.org/0day-ci/archive/20230722/202307222246.K1GYOGCB-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230722/202307222246.K1GYOGCB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202307222246.K1GYOGCB-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/i2c/busses/i2c-virtio.c:270:3: error: field designator 'freeze' does not refer to any field in type 'struct virtio_driver'
.freeze = pm_sleep_ptr(virtio_i2c_freeze),
^
>> drivers/i2c/busses/i2c-virtio.c:271:3: error: field designator 'restore' does not refer to any field in type 'struct virtio_driver'
.restore = pm_sleep_ptr(virtio_i2c_restore),
^
2 errors generated.
vim +270 drivers/i2c/busses/i2c-virtio.c
260
261 static struct virtio_driver virtio_i2c_driver = {
262 .feature_table = features,
263 .feature_table_size = ARRAY_SIZE(features),
264 .id_table = id_table,
265 .probe = virtio_i2c_probe,
266 .remove = virtio_i2c_remove,
267 .driver = {
268 .name = "i2c_virtio",
269 },
> 270 .freeze = pm_sleep_ptr(virtio_i2c_freeze),
> 271 .restore = pm_sleep_ptr(virtio_i2c_restore),
272 };
273 module_virtio_driver(virtio_i2c_driver);
274
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 21/22] i2c: virtio: Remove #ifdef guards for PM related functions
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " Paul Cercueil
2023-07-22 13:55 ` kernel test robot
2023-07-22 15:07 ` kernel test robot
@ 2023-07-22 19:06 ` Paul Cercueil
2 siblings, 0 replies; 35+ messages in thread
From: Paul Cercueil @ 2023-07-22 19:06 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, linux-kernel, Jonathan Cameron, Viresh Kumar,
Conghui Chen, virtualization
As the build bot noticed - this patch is invalid as the
virtio_driver.{freeze,restore} callbacks are guarded by #ifdefs.
Feel free to apply the rest (if everybody is happy with them) and I'll
respin this one.
Cheers,
-Paul
Le samedi 22 juillet 2023 à 13:53 +0200, Paul Cercueil a écrit :
> 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: Viresh Kumar <viresh.kumar@linaro.org>
>
> ---
> Cc: Conghui Chen <conghui.chen@intel.com>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: virtualization@lists.linux-foundation.org
> ---
> drivers/i2c/busses/i2c-virtio.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-virtio.c
> b/drivers/i2c/busses/i2c-virtio.c
> index 4b9536f50800..c60ae531ba57 100644
> --- a/drivers/i2c/busses/i2c-virtio.c
> +++ b/drivers/i2c/busses/i2c-virtio.c
> @@ -243,7 +243,6 @@ static struct virtio_device_id id_table[] = {
> };
> MODULE_DEVICE_TABLE(virtio, id_table);
>
> -#ifdef CONFIG_PM_SLEEP
> static int virtio_i2c_freeze(struct virtio_device *vdev)
> {
> virtio_i2c_del_vqs(vdev);
> @@ -254,7 +253,6 @@ static int virtio_i2c_restore(struct
> virtio_device *vdev)
> {
> return virtio_i2c_setup_vqs(vdev->priv);
> }
> -#endif
>
> static const unsigned int features[] = {
> VIRTIO_I2C_F_ZERO_LENGTH_REQUEST,
> @@ -269,10 +267,8 @@ static struct virtio_driver virtio_i2c_driver =
> {
> .driver = {
> .name = "i2c_virtio",
> },
> -#ifdef CONFIG_PM_SLEEP
> - .freeze = virtio_i2c_freeze,
> - .restore = virtio_i2c_restore,
> -#endif
> + .freeze = pm_sleep_ptr(virtio_i2c_freeze),
> + .restore = pm_sleep_ptr(virtio_i2c_restore),
> };
> module_virtio_driver(virtio_i2c_driver);
>
^ permalink raw reply [flat|nested] 35+ 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; 35+ 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>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 05/22] i2c: designware: Remove #ifdef guards for PM related functions
2023-07-22 11:50 ` [PATCH v2 05/22] i2c: designware: " Paul Cercueil
@ 2023-07-27 10:19 ` Jarkko Nikula
0 siblings, 0 replies; 35+ messages in thread
From: Jarkko Nikula @ 2023-07-27 10:19 UTC (permalink / raw)
To: Paul Cercueil, Wolfram Sang
Cc: linux-i2c, linux-kernel, Jonathan Cameron, Andy Shevchenko,
Mika Westerberg, Jan Dabros
On 7/22/23 14:50, 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> ---
> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Jan Dabros <jsd@semihalf.com>
> ---
> drivers/i2c/busses/i2c-designware-platdrv.c | 22 ++++++---------------
> 1 file changed, 6 insertions(+), 16 deletions(-)
>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 09/22] i2c: img-scb: Remove #ifdef guards for PM related functions
2023-07-22 11:50 ` [PATCH v2 09/22] i2c: img-scb: " Paul Cercueil
@ 2023-07-28 12:18 ` Andi Shyti
0 siblings, 0 replies; 35+ messages in thread
From: Andi Shyti @ 2023-07-28 12:18 UTC (permalink / raw)
To: Paul Cercueil; +Cc: Wolfram Sang, linux-i2c, linux-kernel
Hi Paul,
On Sat, Jul 22, 2023 at 01:50:33PM +0200, 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>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Andi
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM
2023-07-22 11:50 ` [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM Paul Cercueil
@ 2023-07-28 12:19 ` Andi Shyti
0 siblings, 0 replies; 35+ messages in thread
From: Andi Shyti @ 2023-07-28 12:19 UTC (permalink / raw)
To: Paul Cercueil; +Cc: Wolfram Sang, linux-i2c, linux-kernel
Hi Paul,
On Sat, Jul 22, 2023 at 01:50:34PM +0200, Paul Cercueil wrote:
> Provide PM callbacks through platform_driver.driver.pm instead of
> platform_driver.{suspend,resume} as any good-behaved driver should do.
>
> 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>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 35+ 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
` (21 preceding siblings ...)
2023-07-22 11:53 ` [PATCH v2 22/22] i2c: mux: pca954x: " Paul Cercueil
@ 2023-08-02 20:10 ` Andi Shyti
2023-08-14 15:06 ` Wolfram Sang
22 siblings, 1 reply; 35+ 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
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 08/22] i2c: i801: Remove #ifdef guards for PM related functions
2023-07-22 11:50 ` [PATCH v2 08/22] i2c: i801: " Paul Cercueil
@ 2023-08-10 15:25 ` Jean Delvare
0 siblings, 0 replies; 35+ messages in thread
From: Jean Delvare @ 2023-08-10 15:25 UTC (permalink / raw)
To: Paul Cercueil; +Cc: Wolfram Sang, linux-i2c, linux-kernel, Jonathan Cameron
Hi Paul,
On Sat, 22 Jul 2023 13:50:32 +0200, 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>
>
> ---
> Cc: Jean Delvare <jdelvare@suse.com>
> ---
> drivers/i2c/busses/i2c-i801.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 943b8e6d026d..73ae06432133 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -1808,7 +1808,6 @@ static void i801_shutdown(struct pci_dev *dev)
> pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg);
> }
>
> -#ifdef CONFIG_PM_SLEEP
> static int i801_suspend(struct device *dev)
> {
> struct i801_priv *priv = dev_get_drvdata(dev);
> @@ -1827,9 +1826,8 @@ static int i801_resume(struct device *dev)
>
> return 0;
> }
> -#endif
>
> -static SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
> +static DEFINE_SIMPLE_DEV_PM_OPS(i801_pm_ops, i801_suspend, i801_resume);
>
> static struct pci_driver i801_driver = {
> .name = DRV_NAME,
> @@ -1838,7 +1836,7 @@ static struct pci_driver i801_driver = {
> .remove = i801_remove,
> .shutdown = i801_shutdown,
> .driver = {
> - .pm = &i801_pm_ops,
> + .pm = pm_sleep_ptr(&i801_pm_ops),
> .probe_type = PROBE_PREFER_ASYNCHRONOUS,
> },
> };
As far as I can see, this is the same as:
https://lore.kernel.org/linux-i2c/20230628091522.3e58dfb2@endymion.delvare/T/#mbd96bc42299e23f43ff1ebd56e61656882994afc
submitted by Heiner Kallweit back in March, review by myself in June,
but not applied yet. So:
Reviewed-by: Jean Delvare <jdelvare@suse.de>
--
Jean Delvare
SUSE L3 Support
^ permalink raw reply [flat|nested] 35+ 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; 35+ 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: 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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2023-08-14 15:07 UTC | newest]
Thread overview: 35+ 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 01/22] i2c: au1550: Remove #ifdef guards for PM related functions Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 02/22] i2c: iproc: " 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 05/22] i2c: designware: " Paul Cercueil
2023-07-27 10:19 ` Jarkko Nikula
2023-07-22 11:50 ` [PATCH v2 06/22] i2c: exynos5: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 07/22] i2c: hix5hd2: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 08/22] i2c: i801: " Paul Cercueil
2023-08-10 15:25 ` Jean Delvare
2023-07-22 11:50 ` [PATCH v2 09/22] i2c: img-scb: " Paul Cercueil
2023-07-28 12:18 ` Andi Shyti
2023-07-22 11:50 ` [PATCH v2 10/22] i2c: kempld: Convert to use regular device PM Paul Cercueil
2023-07-28 12:19 ` Andi Shyti
2023-07-22 11:50 ` [PATCH v2 11/22] i2c: lpc2k: Remove #ifdef guards for PM related functions 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 14/22] i2c: ocores: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 15/22] i2c: pnx: " Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 16/22] i2c: pxa: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 17/22] i2c: qup: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 18/22] i2c: rcar: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 19/22] i2c: s3c2410: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 20/22] i2c: sh-mobile: " Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 21/22] i2c: virtio: " Paul Cercueil
2023-07-22 13:55 ` kernel test robot
2023-07-22 15:07 ` kernel test robot
2023-07-22 19:06 ` Paul Cercueil
2023-07-22 11:53 ` [PATCH v2 22/22] i2c: mux: pca954x: " 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;
as well as URLs for NNTP newsgroup(s).