[PATCH] dmaengine: axi-dmac: add reset deassert logic

From: Sergey Matsievskiy

Date: Thu Nov 05 2026 - 08:45:41 EST


From: Sergey Matsievskiy <matsievskiysv@xxxxxxxxx>

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

Signed-off-by: Sergey Matsievskiy <matsievskiysv@xxxxxxxxx>
---
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