* [PATCH v2 00/22] i2c: Use new PM macros
@ 2023-07-22 11:50 Paul Cercueil
2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: Remove #ifdef guards for PM related functions Paul Cercueil
2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
0 siblings, 2 replies; 4+ 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] 4+ 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
@ 2023-07-22 11:50 ` Paul Cercueil
2023-08-02 20:10 ` [PATCH v2 00/22] i2c: Use new PM macros Andi Shyti
1 sibling, 0 replies; 4+ 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] 4+ 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
2023-07-22 11:50 ` [PATCH v2 12/22] i2c: mt65xx: Remove #ifdef guards for PM related functions Paul Cercueil
@ 2023-08-02 20:10 ` Andi Shyti
2023-08-14 15:06 ` Wolfram Sang
1 sibling, 1 reply; 4+ 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] 4+ 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; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2023-08-14 15:07 UTC | newest]
Thread overview: 4+ 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 12/22] i2c: mt65xx: Remove #ifdef guards for PM related functions 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