提交 e611bd82 编写于 作者: M Mark Brown

ASoC: Only write back non-default registers when resuming WM8753

This will reduce the number of writes done on resume, allowing that to
complete faster (especially on systems with very slow I2C like the
current Samsung driver).
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 c2bac160
......@@ -1526,6 +1526,11 @@ static int wm8753_resume(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(wm8753_reg); i++) {
if (i + 1 == WM8753_RESET)
continue;
/* No point in writing hardware default values back */
if (cache[i] == wm8753_reg[i])
continue;
data[0] = ((i + 1) << 1) | ((cache[i] >> 8) & 0x0001);
data[1] = cache[i] & 0x00ff;
codec->hw_write(codec->control_data, data, 2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册