]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: rt722: make regmap cache-only in probe
authorShuming Fan <shumingf@realtek.com>
Mon, 19 May 2025 09:06:45 +0000 (17:06 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 19 May 2025 10:41:33 +0000 (11:41 +0100)
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>
sound/soc/codecs/rt722-sdca-sdw.h
sound/soc/codecs/rt722-sdca.c

index 80b01445694069c75fe9dc8f6ea9b155f2195f22..c5dd472a2c0078723f9df761dc1b5600ae301b29 100644 (file)
@@ -34,6 +34,7 @@ static const struct reg_default rt722_sdca_reg_defaults[] = {
        { 0x200003c, 0xc214 },
        { 0x2000046, 0x8004 },
        { 0x5810000, 0x702d },
+       { 0x6100000, 0x0201 },
        { 0x6100006, 0x0005 },
        { 0x6100010, 0x2630 },
        { 0x6100011, 0x152f },
index f0d3fd9b3d9565709d094348d34dbe881ea3af8f..ac9588284a955cccf16044fac699bdb343702908 100644 (file)
@@ -1309,6 +1309,8 @@ int rt722_sdca_init(struct device *dev, struct regmap *regmap, struct sdw_slave
        rt722->slave = slave;
        rt722->regmap = regmap;
 
+       regcache_cache_only(rt722->regmap, true);
+
        mutex_init(&rt722->calibrate_mutex);
        mutex_init(&rt722->disable_irq_lock);
 
@@ -1521,8 +1523,8 @@ int rt722_sdca_io_init(struct device *dev, struct sdw_slave *slave)
        if (rt722->hw_init)
                return 0;
 
+       regcache_cache_only(rt722->regmap, false);
        if (rt722->first_hw_init) {
-               regcache_cache_only(rt722->regmap, false);
                regcache_cache_bypass(rt722->regmap, true);
        } else {
                /*