Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: qcom: bam_dma: make bam clk optional

When BAM is remotely controlled it does not sound correct to control
its clk on Linux side. Make it optional, so that its not mandatory
for remote controlled BAM instances.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by

Srinivas Kandagatla and committed by
Vinod Koul
9d31821f 7928b2cb

+6 -2
+6 -2
drivers/dma/qcom/bam_dma.c
··· 1233 1233 "qcom,controlled-remotely"); 1234 1234 1235 1235 bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk"); 1236 - if (IS_ERR(bdev->bamclk)) 1237 - return PTR_ERR(bdev->bamclk); 1236 + if (IS_ERR(bdev->bamclk)) { 1237 + if (!bdev->controlled_remotely) 1238 + return PTR_ERR(bdev->bamclk); 1239 + 1240 + bdev->bamclk = NULL; 1241 + } 1238 1242 1239 1243 ret = clk_prepare_enable(bdev->bamclk); 1240 1244 if (ret) {