ASoC: rt5682: fix getting the wrong device id when the suspend_stress_test
authorShuming Fan <shumingf@realtek.com>
Mon, 11 Jan 2021 09:27:40 +0000 (17:27 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jan 2021 14:03:51 +0000 (14:03 +0000)
commit867f8d18df4f5ccd6c2daf4441a6adeca0b9725b
tree3b2308432c602c000c6ee12942b6ccd38f152573
parent31c51a424f5163ee6f14fcc251f81078457123e1
ASoC: rt5682: fix getting the wrong device id when the suspend_stress_test

This patch will be the workaround to fix getting the wrong device ID on the rare chance.
It seems like something unstable when the system resumes. e.g. the bus clock
This patch tries to read the device ID to check several times.
After the test, the driver will get the correct device ID the second time.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20210111092740.9128-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5682-sdw.c