projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9266d95
)
ASoC: rt5682-sdw: set regcache_cache_only false before reading RT5682_DEVICE_ID
author
Bard Liao
<yung-chuan.liao@linux.intel.com>
Mon, 7 Jun 2021 22:22:37 +0000
(17:22 -0500)
committer
Mark Brown
<broonie@kernel.org>
Tue, 8 Jun 2021 12:36:39 +0000
(13:36 +0100)
RT5682_DEVICE_ID is a volatile register, we can not read it in cache
only mode.
Fixes: 03f6fc6de919 ("ASoC: rt5682: Add the soundwire support")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link:
https://lore.kernel.org/r/20210607222239.582139-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5682-sdw.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/rt5682-sdw.c
b/sound/soc/codecs/rt5682-sdw.c
index 529a85fd0a000165f9c11ddb2f17d406e8f02381..54873730bec550e94ac7d84c68fec73aca0e221d 100644
(file)
--- a/
sound/soc/codecs/rt5682-sdw.c
+++ b/
sound/soc/codecs/rt5682-sdw.c
@@
-400,6
+400,11
@@
static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
pm_runtime_get_noresume(&slave->dev);
+ if (rt5682->first_hw_init) {
+ regcache_cache_only(rt5682->regmap, false);
+ regcache_cache_bypass(rt5682->regmap, true);
+ }
+
while (loop > 0) {
regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val);
if (val == DEVICE_ID)
@@
-415,11
+420,6
@@
static int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
goto err_nodev;
}
- if (rt5682->first_hw_init) {
- regcache_cache_only(rt5682->regmap, false);
- regcache_cache_bypass(rt5682->regmap, true);
- }
-
rt5682_calibrate(rt5682);
if (rt5682->first_hw_init) {