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

Commit ff936209 authored by Sudheer Papothi's avatar Sudheer Papothi
Browse files

soundwire: use pm runtime function to resume soundwire master



use pm_runtime_get_sync to resume soundwire master
from codec driver. This will make sure power management
will be synched when soundwire master resumes.

Change-Id: Ie634edeb721f5c207fcdf1572e98ef2e4a06a63e
Signed-off-by: default avatarSudheer Papothi <spapothi@codeaurora.org>
parent f81d0b1f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1406,7 +1406,7 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
			dev_dbg(swrm->dev, "%s: SWR master is already UP: %d\n",
				__func__, swrm->state);
		} else {
			swrm_runtime_resume(&pdev->dev);
			pm_runtime_get_sync(&pdev->dev);
			list_for_each_entry(swr_dev, &mstr->devices, dev_list) {
				ret = swr_reset_device(swr_dev);
				if (ret) {
@@ -1416,6 +1416,8 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
					swrm_clk_request(swrm, false);
				}
			}
			pm_runtime_mark_last_busy(&pdev->dev);
			pm_runtime_put_autosuspend(&pdev->dev);
		}
		mutex_unlock(&swrm->mlock);
		break;