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

Commit 195f8949 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: soundwire: Check for clock source before clock switch"

parents ff882785 8c50f2f7
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -3076,9 +3076,18 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
		 * next activity on soundwire will request clock from new clock
		 * source.
		 */
		if (!data) {
			dev_err(swrm->dev, "%s: data is NULL for id:%d\n",
				__func__, id);
			ret = -EINVAL;
			break;
		}
		mutex_lock(&swrm->mlock);
		if (swrm->clk_src != *(int *)data) {
			if (swrm->state == SWR_MSTR_UP)
				swrm_device_suspend(&pdev->dev);
			swrm->clk_src = *(int *)data;
		}
		mutex_unlock(&swrm->mlock);
		break;
	case SWR_CLK_FREQ:
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ struct swr_mstr_ctrl {
	u32 swr_irq_wakeup_capable;
	int hw_core_clk_en;
	int aud_core_clk_en;
	int clk_src;
#ifdef CONFIG_DEBUG_FS
	struct dentry *debugfs_swrm_dent;
	struct dentry *debugfs_peek;