|
Takashi Iwai |
34602b |
From 0fad605fb0bdc00d8ad78696300ff2fbdee6e048 Mon Sep 17 00:00:00 2001
|
|
Takashi Iwai |
34602b |
From: Richard Fitzgerald <rf@opensource.cirrus.com>
|
|
Takashi Iwai |
34602b |
Date: Tue, 11 May 2021 14:28:55 +0100
|
|
Takashi Iwai |
34602b |
Subject: [PATCH] ASoC: cs42l42: Regmap must use_single_read/write
|
|
Takashi Iwai |
34602b |
Git-commit: 0fad605fb0bdc00d8ad78696300ff2fbdee6e048
|
|
Takashi Iwai |
34602b |
Patch-mainline: v5.13-rc4
|
|
Takashi Iwai |
34602b |
References: git-fixes
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
cs42l42 does not support standard burst transfers so the use_single_read
|
|
Takashi Iwai |
34602b |
and use_single_write flags must be set in the regmap config.
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
Because of this bug, the patch:
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
commit 0a0eb567e1d4 ("ASoC: cs42l42: Minor error paths fixups")
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
broke cs42l42 probe() because without the use_single_* flags it causes
|
|
Takashi Iwai |
34602b |
regmap to issue a burst read.
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
However, the missing use_single_* could cause problems anyway because the
|
|
Takashi Iwai |
34602b |
regmap cache can attempt burst transfers if these flags are not set.
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec")
|
|
Takashi Iwai |
34602b |
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
|
|
Takashi Iwai |
34602b |
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
|
|
Takashi Iwai |
34602b |
Link: https://lore.kernel.org/r/20210511132855.27159-1-rf@opensource.cirrus.com
|
|
Takashi Iwai |
34602b |
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Takashi Iwai |
34602b |
Acked-by: Takashi Iwai <tiwai@suse.de>
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
---
|
|
Takashi Iwai |
34602b |
sound/soc/codecs/cs42l42.c | 3 +++
|
|
Takashi Iwai |
34602b |
1 file changed, 3 insertions(+)
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
|
|
Takashi Iwai |
34602b |
index bf982e145e94..77473c226f9e 100644
|
|
Takashi Iwai |
34602b |
--- a/sound/soc/codecs/cs42l42.c
|
|
Takashi Iwai |
34602b |
+++ b/sound/soc/codecs/cs42l42.c
|
|
Takashi Iwai |
34602b |
@@ -399,6 +399,9 @@ static const struct regmap_config cs42l42_regmap = {
|
|
Takashi Iwai |
34602b |
.reg_defaults = cs42l42_reg_defaults,
|
|
Takashi Iwai |
34602b |
.num_reg_defaults = ARRAY_SIZE(cs42l42_reg_defaults),
|
|
Takashi Iwai |
34602b |
.cache_type = REGCACHE_RBTREE,
|
|
Takashi Iwai |
34602b |
+
|
|
Takashi Iwai |
34602b |
+ .use_single_read = true,
|
|
Takashi Iwai |
34602b |
+ .use_single_write = true,
|
|
Takashi Iwai |
34602b |
};
|
|
Takashi Iwai |
34602b |
|
|
Takashi Iwai |
34602b |
static DECLARE_TLV_DB_SCALE(adc_tlv, -9600, 100, false);
|
|
Takashi Iwai |
34602b |
--
|
|
Takashi Iwai |
34602b |
2.26.2
|
|
Takashi Iwai |
34602b |
|