linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: cs42l42: Regmap must use_single_read/write
@ 2021-05-11 13:28 Richard Fitzgerald
  2021-05-11 14:56 ` Charles Keepax
  2021-05-11 18:21 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2021-05-11 13:28 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, patches, linux-kernel, Richard Fitzgerald

cs42l42 does not support standard burst transfers so the use_single_read
and use_single_write flags must be set in the regmap config.

Because of this bug, the patch:

commit 0a0eb567e1d4 ("ASoC: cs42l42: Minor error paths fixups")

broke cs42l42 probe() because without the use_single_* flags it causes
regmap to issue a burst read.

However, the missing use_single_* could cause problems anyway because the
regmap cache can attempt burst transfers if these flags are not set.

Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 sound/soc/codecs/cs42l42.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index d7fb6b38fd7c..e4b058a1d6af 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -400,6 +400,9 @@ static const struct regmap_config cs42l42_regmap = {
 	.reg_defaults = cs42l42_reg_defaults,
 	.num_reg_defaults = ARRAY_SIZE(cs42l42_reg_defaults),
 	.cache_type = REGCACHE_RBTREE,
+
+	.use_single_read = true,
+	.use_single_write = true,
 };
 
 static DECLARE_TLV_DB_SCALE(adc_tlv, -9600, 100, false);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: cs42l42: Regmap must use_single_read/write
  2021-05-11 13:28 [PATCH] ASoC: cs42l42: Regmap must use_single_read/write Richard Fitzgerald
@ 2021-05-11 14:56 ` Charles Keepax
  2021-05-11 18:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2021-05-11 14:56 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: broonie, alsa-devel, patches, linux-kernel

On Tue, May 11, 2021 at 02:28:55PM +0100, Richard Fitzgerald wrote:
> cs42l42 does not support standard burst transfers so the use_single_read
> and use_single_write flags must be set in the regmap config.
> 
> Because of this bug, the patch:
> 
> commit 0a0eb567e1d4 ("ASoC: cs42l42: Minor error paths fixups")
> 
> broke cs42l42 probe() because without the use_single_* flags it causes
> regmap to issue a burst read.
> 
> However, the missing use_single_* could cause problems anyway because the
> regmap cache can attempt burst transfers if these flags are not set.
> 
> Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec")
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks Richard, I guess I better check the other devices I fixed
up for the same issue, as I am guessing that could probably
affect a few more. The few I have hardware to test already have
the single stuff set.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: cs42l42: Regmap must use_single_read/write
  2021-05-11 13:28 [PATCH] ASoC: cs42l42: Regmap must use_single_read/write Richard Fitzgerald
  2021-05-11 14:56 ` Charles Keepax
@ 2021-05-11 18:21 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-05-11 18:21 UTC (permalink / raw)
  To: Richard Fitzgerald; +Cc: Mark Brown, patches, linux-kernel, alsa-devel

On Tue, 11 May 2021 14:28:55 +0100, Richard Fitzgerald wrote:
> cs42l42 does not support standard burst transfers so the use_single_read
> and use_single_write flags must be set in the regmap config.
> 
> Because of this bug, the patch:
> 
> commit 0a0eb567e1d4 ("ASoC: cs42l42: Minor error paths fixups")
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: cs42l42: Regmap must use_single_read/write
      commit: 0fad605fb0bdc00d8ad78696300ff2fbdee6e048

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-11 18:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 13:28 [PATCH] ASoC: cs42l42: Regmap must use_single_read/write Richard Fitzgerald
2021-05-11 14:56 ` Charles Keepax
2021-05-11 18:21 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).