On 10/20/25 12:15 PM, Dmitry Baryshkov wrote:
On Mon, Oct 20, 2025 at 02:55:57AM +0100, Alexey Klimov wrote:
Commit 4e65bda8273c ("ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()") revealed the problem in slimbus regmap. That commit breaks audio playback, for instance, on sdm845 Thundercomm Dragonboard 845c board:
The __devm_regmap_init_slimbus() started to be used instead of __regmap_init_slimbus() after the commit mentioned above and turns out the incorrect bus_context pointer (3rd argument) was used in __devm_regmap_init_slimbus(). It should be &slimbus->dev. Correct it. The wcd934x codec seems to be the only (or the first) user of devm_regmap_init_slimbus() but we should fix till the point where __devm_regmap_init_slimbus() was introduced therefore two "Fixes" tags.
Fixes: 4e65bda8273c ("ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()") Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support") Cc: stable@vger.kernel.org Cc: Dmitry Baryshkov dmitry.baryshkov@oss.qualcomm.com Cc: Ma Ke make24@iscas.ac.cn Cc: Steev Klimaszewski steev@kali.org Cc: Srinivas Kandagatla srini@kernel.org Signed-off-by: Alexey Klimov alexey.klimov@linaro.org
The patch/fix is for the current 6.18 development cycle since it is fixes the regression introduced in 6.18.0-rc1.
drivers/base/regmap/regmap-slimbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-slimbus.c b/drivers/base/regmap/regmap-slimbus.c index 54eb7d227cf4..edfee18fbea1 100644 --- a/drivers/base/regmap/regmap-slimbus.c +++ b/drivers/base/regmap/regmap-slimbus.c @@ -63,7 +63,7 @@ struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus, if (IS_ERR(bus)) return ERR_CAST(bus);
- return __devm_regmap_init(&slimbus->dev, bus, &slimbus, config,
- return __devm_regmap_init(&slimbus->dev, bus, &slimbus->dev, config,
Looking at regmap_slimbus_write(), the correct bus context should be just 'slimbus' (which is equal to '&slimbus->dev', because dev is the first field in struct slimbus_device. So, while the patch is correct, I'd suggest just passing slimbus (and fixing __regmap_init_slimbus() too).
+1 I agree, it adds more clarity to just pass slimbus instead of dev.
--srini> >> lock_key, lock_name);
} EXPORT_SYMBOL_GPL(__devm_regmap_init_slimbus); -- 2.47.3