* [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups
@ 2025-09-04 15:25 Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-09-04 15:25 UTC (permalink / raw)
To: Vinod Koul, Laurent Pinchart, Magnus Damm
Cc: dmaengine, linux-renesas-soc, Geert Uytterhoeven
Hi all,
This patch series contains various cleanups related to power management
for the Renesas R-Car DMAC driver.
ARM64 platforms.
This has been tested on R-Car Gen2, Gen3, and Gen4.
Thanks for your comments!
Geert Uytterhoeven (2):
dmaengine: rcar-dmac: Remove dummy Runtime PM callback
dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
drivers/dma/sh/rcar-dmac.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
--
2.43.0
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback
2025-09-04 15:25 [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Geert Uytterhoeven
@ 2025-09-04 15:25 ` Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS() Geert Uytterhoeven
2025-10-16 15:02 ` [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-09-04 15:25 UTC (permalink / raw)
To: Vinod Koul, Laurent Pinchart, Magnus Damm
Cc: dmaengine, linux-renesas-soc, Geert Uytterhoeven
Since commit 63d00be69348fda4 ("PM: runtime: Allow unassigned
->runtime_suspend|resume callbacks"), unassigned
.runtime_{suspend,resume}() callbacks are treated the same as dummy
callbacks that just return zero.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/dma/sh/rcar-dmac.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index be7c239f5b721b2b..6a6c3234702c648e 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1729,11 +1729,6 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec,
*/
#ifdef CONFIG_PM
-static int rcar_dmac_runtime_suspend(struct device *dev)
-{
- return 0;
-}
-
static int rcar_dmac_runtime_resume(struct device *dev)
{
struct rcar_dmac *dmac = dev_get_drvdata(dev);
@@ -1750,8 +1745,7 @@ static const struct dev_pm_ops rcar_dmac_pm = {
*/
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(rcar_dmac_runtime_suspend, rcar_dmac_runtime_resume,
- NULL)
+ SET_RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL)
};
/* -----------------------------------------------------------------------------
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
2025-09-04 15:25 [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback Geert Uytterhoeven
@ 2025-09-04 15:25 ` Geert Uytterhoeven
2025-10-16 15:02 ` [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2025-09-04 15:25 UTC (permalink / raw)
To: Vinod Koul, Laurent Pinchart, Magnus Damm
Cc: dmaengine, linux-renesas-soc, Geert Uytterhoeven
Convert the Renesas R-Car DMA Controller driver from
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() to
NOIRQ_SYSTEM_SLEEP_PM_OPS(), RUNTIME_PM_OPS(), and pm_ptr(). This lets
us drop the check for CONFIG_PM, and reduces kernel size in case
CONFIG_PM is disabled, while increasing build coverage.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
drivers/dma/sh/rcar-dmac.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 6a6c3234702c648e..78dafa24c112ef3a 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1728,14 +1728,12 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec,
* Power management
*/
-#ifdef CONFIG_PM
static int rcar_dmac_runtime_resume(struct device *dev)
{
struct rcar_dmac *dmac = dev_get_drvdata(dev);
return rcar_dmac_init(dmac);
}
-#endif
static const struct dev_pm_ops rcar_dmac_pm = {
/*
@@ -1743,9 +1741,9 @@ static const struct dev_pm_ops rcar_dmac_pm = {
* - Wait for the current transfer to complete and stop the device,
* - Resume transfers, if any.
*/
- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
- pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL)
+ NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+ pm_runtime_force_resume)
+ RUNTIME_PM_OPS(NULL, rcar_dmac_runtime_resume, NULL)
};
/* -----------------------------------------------------------------------------
@@ -2030,7 +2028,7 @@ MODULE_DEVICE_TABLE(of, rcar_dmac_of_ids);
static struct platform_driver rcar_dmac_driver = {
.driver = {
- .pm = &rcar_dmac_pm,
+ .pm = pm_ptr(&rcar_dmac_pm),
.name = "rcar-dmac",
.of_match_table = rcar_dmac_of_ids,
},
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups
2025-09-04 15:25 [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS() Geert Uytterhoeven
@ 2025-10-16 15:02 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2025-10-16 15:02 UTC (permalink / raw)
To: Laurent Pinchart, Magnus Damm, Geert Uytterhoeven
Cc: dmaengine, linux-renesas-soc
On Thu, 04 Sep 2025 17:25:08 +0200, Geert Uytterhoeven wrote:
> Hi all,
>
> This patch series contains various cleanups related to power management
> for the Renesas R-Car DMAC driver.
> ARM64 platforms.
>
> This has been tested on R-Car Gen2, Gen3, and Gen4.
>
> [...]
Applied, thanks!
[1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback
commit: b78c6286acd7ef93ddb064b5ad08b993eab33482
[2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS()
commit: c3c328d2383fa7f68ec93574152924cd8f5fe82c
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-10-16 15:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 15:25 [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 1/2] dmaengine: rcar-dmac: Remove dummy Runtime PM callback Geert Uytterhoeven
2025-09-04 15:25 ` [PATCH 2/2] dmaengine: rcar-dmac: Convert to NOIRQ_SYSTEM_SLEEP/RUNTIME_PM_OPS() Geert Uytterhoeven
2025-10-16 15:02 ` [PATCH 0/2] dmaengine: rcar-dmac: PM-related cleanups Vinod Koul
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).