Skip to content

Commit 152c773

Browse files
shumingfanbroonie
authored andcommitted
ASoC: rt722: make regmap cache-only in probe
This patch makes sure the access to the codecs is cached until the device is enumerated. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250519090645.2620292-1-shumingf@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a282060 commit 152c773

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sound/soc/codecs/rt722-sdca-sdw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ static const struct reg_default rt722_sdca_reg_defaults[] = {
3434
{ 0x200003c, 0xc214 },
3535
{ 0x2000046, 0x8004 },
3636
{ 0x5810000, 0x702d },
37+
{ 0x6100000, 0x0201 },
3738
{ 0x6100006, 0x0005 },
3839
{ 0x6100010, 0x2630 },
3940
{ 0x6100011, 0x152f },

sound/soc/codecs/rt722-sdca.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,8 @@ int rt722_sdca_init(struct device *dev, struct regmap *regmap, struct sdw_slave
13091309
rt722->slave = slave;
13101310
rt722->regmap = regmap;
13111311

1312+
regcache_cache_only(rt722->regmap, true);
1313+
13121314
mutex_init(&rt722->calibrate_mutex);
13131315
mutex_init(&rt722->disable_irq_lock);
13141316

@@ -1521,8 +1523,8 @@ int rt722_sdca_io_init(struct device *dev, struct sdw_slave *slave)
15211523
if (rt722->hw_init)
15221524
return 0;
15231525

1526+
regcache_cache_only(rt722->regmap, false);
15241527
if (rt722->first_hw_init) {
1525-
regcache_cache_only(rt722->regmap, false);
15261528
regcache_cache_bypass(rt722->regmap, true);
15271529
} else {
15281530
/*

0 commit comments

Comments
 (0)