mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: axi-dmac: add reset deassert logic
@ 2026-11-05 13:40 Sergey Matsievskiy
  2026-11-05 17:19 ` Frank Li
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Matsievskiy @ 2026-11-05 13:40 UTC (permalink / raw)
  To: dmaengine; +Cc: lars, vkoul, Frank.Li, linux-kernel, Sergey Matsievskiy

From: Sergey Matsievskiy <matsievskiysv@gmail.com>

Add optional shared reset deassert logic, sometimes required for
communication with the device.

Signed-off-by: Sergey Matsievskiy <matsievskiysv@gmail.com>
---
 drivers/dma/dma-axi-dmac.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index d47ff27e1408..98aaccd26a26 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -24,6 +24,7 @@
 #include <linux/of_address.h>
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
+#include <linux/reset.h>
 #include <linux/slab.h>
 
 #include <dt-bindings/dma/axi-dmac.h>
@@ -1211,10 +1212,16 @@ static int axi_dmac_probe(struct platform_device *pdev)
 	struct axi_dmac *dmac;
 	struct clk *clk;
 	struct regmap *regmap;
+	struct reset_control *rstc;
 	unsigned int version;
 	u32 irq_mask = 0;
 	int ret;
 
+	rstc = devm_reset_control_get_optional_shared_deasserted(&pdev->dev, NULL);
+	if (IS_ERR(rstc))
+		return dev_err_probe(&pdev->dev, PTR_ERR(rstc),
+				     "failed to deassert reset\n");
+
 	dmac = devm_kzalloc(&pdev->dev, sizeof(*dmac), GFP_KERNEL);
 	if (!dmac)
 		return -ENOMEM;
-- 
2.47.3


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

end of thread, other threads:[~2026-11-06  4:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 13:40 [PATCH] dmaengine: axi-dmac: add reset deassert logic Sergey Matsievskiy
2026-11-05 17:19 ` Frank Li
2026-11-06  4:26   ` Sergey Matsievskiy

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

all inboxes | Powered by JetHome®