[PATCH 2/2] ASoC: cs35l56-test: Initialize DP3 mixer registers in mock regmap

From: Richard Fitzgerald

Date: Thu Nov 26 2026 - 10:44:34 EST


In cs35l56_test_create_mock_device_registers() put dummy values in the
simulated CS35L56_SWIRE_DP3_CH*_INPUT registers so that they can be read.

This fixes a problem with the cs35l56_test_component_probe_omits_sdw_mux()
test. The test aims to prove that component_probe() does not put a value
in the regmap cache that will be written out to the registers during a
regcache_sync(). But the registers did not have a value in the simulated
regmap, so an attempt to read the register would fail instead of
populating the cache.

Fixes: 406541bbf4eb ("ASoC: cs35l56: Add test that probe() doesn't write SDW mux registers")
Signed-off-by: Richard Fitzgerald <rf@xxxxxxxxxxxxxxxxxxxxx>
---
sound/soc/codecs/cs35l56-test.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/cs35l56-test.c b/sound/soc/codecs/cs35l56-test.c
index 362da30b949e..2285076b9d0e 100644
--- a/sound/soc/codecs/cs35l56-test.c
+++ b/sound/soc/codecs/cs35l56-test.c
@@ -280,6 +280,7 @@ static void cs35l56_test_create_mock_device_registers(struct kunit *test)

cs35l56_test_fill_register_range(test, &cs35l56_test_asp_config_registers_range, 0);
cs35l56_test_fill_register_range(test, &cs35l56_test_asp_mixer_registers_range, 0);
+ cs35l56_test_fill_register_range(test, &cs35l56_test_sdw_mux_registers_range, 0);
}

/*
--
2.47.3