diff options
| -rw-r--r-- | drivers/dma/qcom/bam_dma.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index 6919f501b9f3..d29275b97e84 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c | |||
| @@ -1333,6 +1333,11 @@ static int bam_dma_probe(struct platform_device *pdev) | |||
| 1333 | if (ret) | 1333 | if (ret) |
| 1334 | goto err_unregister_dma; | 1334 | goto err_unregister_dma; |
| 1335 | 1335 | ||
| 1336 | if (bdev->controlled_remotely) { | ||
| 1337 | pm_runtime_disable(&pdev->dev); | ||
| 1338 | return 0; | ||
| 1339 | } | ||
| 1340 | |||
| 1336 | pm_runtime_irq_safe(&pdev->dev); | 1341 | pm_runtime_irq_safe(&pdev->dev); |
| 1337 | pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY); | 1342 | pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY); |
| 1338 | pm_runtime_use_autosuspend(&pdev->dev); | 1343 | pm_runtime_use_autosuspend(&pdev->dev); |
| @@ -1416,7 +1421,8 @@ static int __maybe_unused bam_dma_suspend(struct device *dev) | |||
| 1416 | { | 1421 | { |
| 1417 | struct bam_device *bdev = dev_get_drvdata(dev); | 1422 | struct bam_device *bdev = dev_get_drvdata(dev); |
| 1418 | 1423 | ||
| 1419 | pm_runtime_force_suspend(dev); | 1424 | if (!bdev->controlled_remotely) |
| 1425 | pm_runtime_force_suspend(dev); | ||
| 1420 | 1426 | ||
| 1421 | clk_unprepare(bdev->bamclk); | 1427 | clk_unprepare(bdev->bamclk); |
| 1422 | 1428 | ||
| @@ -1432,7 +1438,8 @@ static int __maybe_unused bam_dma_resume(struct device *dev) | |||
| 1432 | if (ret) | 1438 | if (ret) |
| 1433 | return ret; | 1439 | return ret; |
| 1434 | 1440 | ||
| 1435 | pm_runtime_force_resume(dev); | 1441 | if (!bdev->controlled_remotely) |
| 1442 | pm_runtime_force_resume(dev); | ||
| 1436 | 1443 | ||
| 1437 | return 0; | 1444 | return 0; |
| 1438 | } | 1445 | } |
