Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d31821f authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Vinod Koul
Browse files

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: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 7928b2cb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1233,9 +1233,13 @@ static int bam_dma_probe(struct platform_device *pdev)
						"qcom,controlled-remotely");

	bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
	if (IS_ERR(bdev->bamclk))
	if (IS_ERR(bdev->bamclk)) {
		if (!bdev->controlled_remotely)
			return PTR_ERR(bdev->bamclk);

		bdev->bamclk = NULL;
	}

	ret = clk_prepare_enable(bdev->bamclk);
	if (ret) {
		dev_err(bdev->dev, "failed to prepare/enable clock\n");