linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Shimko <a.shimko.dev@gmail.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: p.zabel@pengutronix.de, dan.carpenter@linaro.org,
	Eugeniy.Paltsev@synopsys.com, a.shimko.dev@gmail.com,
	linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org
Subject: [PATCH v5 0/3] dmaengine: dw-axi-dmac: PM cleanup and reset control support
Date: Thu, 23 Oct 2025 23:21:30 +0300	[thread overview]
Message-ID: <20251023202134.1291034-1-a.shimko.dev@gmail.com> (raw)

Hello maintainers and reviewers,

This patch series improves the dw-axi-dmac driver in two areas:

Patch 1 simplifies the power management code by using modern kernel
macros and removing redundant wrapper functions, making the code more
maintainable and aligned with current kernel practices.

Patch 2 adds proper reset control support to ensure reliable
initialization and power management, handling resets during probe,
remove, and suspend/resume operations.

For debugging, I used dev_info from the suspend/resume functions.
Before pushing, I removed dev_info from the driver.

Suspend:
echo 0 > /sys/module/printk/parameters/console_suspend
echo mem > /sys/power/state
...
[  195.339311] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_suspend
[  195.350274] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_suspend
[  195.361223] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_suspend
...

Resume:
...
[  200.669945] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_resume
[  200.680975] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_resume
[  200.692108] dw_axi_dmac_platform 100NDA00.NDA-axi-dma: drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c axi_dma_resume
...

Patch 3 resolves the following smatch warnings:
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1237 dma_chan_pause() warn: inconsistent indenting
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:1284 axi_chan_resume() warn: inconsistent indenting

To check the fix of the warnings:
    make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j$(nproc) C=2 \
    CHECK="../smatch/smatch -p=kernel" \
    drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.o

--
Best regards,
Artem Shimko

ChangeLog:
  v1:
    * https://lore.kernel.org/all/20251012100002.2959213-1-a.shimko.dev@gmail.com/T/#t
  v2:
    * https://lore.kernel.org/all/20251013150234.3200627-1-a.shimko.dev@gmail.com/T/#u
  v3:
    * https://lore.kernel.org/all/20251016154627.175796-1-a.shimko.dev@gmail.com/T/#t
  v4:
    * https://lore.kernel.org/all/20251017102950.206443-1-a.shimko.dev@gmail.com/T/#t
  v5:
    * Fix smatch warnings about inconsistent indentation in dma_chan_pause()
    and axi_chan_resume() functions.

Artem Shimko (3):
  dmaengine: dw-axi-dmac: simplify PM functions and use modern macros
  dmaengine: dw-axi-dmac: add reset control support
  dmaengine: dw-axi-dmac: fix inconsistent indentation in pause/resume
    functions

 .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 90 +++++++++++--------
 drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  1 +
 2 files changed, 52 insertions(+), 39 deletions(-)

-- 
2.43.0


             reply	other threads:[~2025-10-23 20:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 20:21 Artem Shimko [this message]
2025-10-23 20:21 ` [PATCH v5 1/3] dmaengine: dw-axi-dmac: simplify PM functions and use modern macros Artem Shimko
2025-10-23 20:21 ` [PATCH v5 2/3] dmaengine: dw-axi-dmac: add reset control support Artem Shimko
2025-10-23 20:21 ` [PATCH v5 3/3] dmaengine: dw-axi-dmac: fix inconsistent indentation in pause/resume functions Artem Shimko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251023202134.1291034-1-a.shimko.dev@gmail.com \
    --to=a.shimko.dev@gmail.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is 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).