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

Commit a8f82720 authored by Sugar Zhang's avatar Sugar Zhang Committed by Greg Kroah-Hartman
Browse files

ASoC: rockchip: pdm: fix regmap_ops hang issue



[ Upstream commit c85064435fe7a216ec0f0238ef2b8f7cd850a450 ]

This is because set_fmt ops maybe called when PD is off,
and in such case, regmap_ops will lead system hang.
enale PD before doing regmap_ops.

Signed-off-by: default avatarSugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5d60a066
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -208,7 +208,9 @@ static int rockchip_pdm_set_fmt(struct snd_soc_dai *cpu_dai,
		return -EINVAL;
	}

	pm_runtime_get_sync(cpu_dai->dev);
	regmap_update_bits(pdm->regmap, PDM_CLK_CTRL, mask, val);
	pm_runtime_put(cpu_dai->dev);

	return 0;
}