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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:43 +0000 (16:56 +0200)
commit696cfb25679452721215c193ba6f72eebfe7a842
tree6b56ee73e8302b3a9d9c857d7b221a3e2aea1caf
parent8ef111db5e077c09529b9446e41d893663d04d60
ASoC: rt5682: fix getting the wrong device id when the suspend_stress_test

[ Upstream commit 867f8d18df4f5ccd6c2daf4441a6adeca0b9725b ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/rt5682-sdw.c