diff mbox series

ASoC: tlv320aic31xx: Make regmap cache only on probe()

Message ID 20210707160234.16253-1-broonie@kernel.org
State Accepted
Commit 6c621b811f99feb3941f04b386795b45f47cd771
Headers show
Series ASoC: tlv320aic31xx: Make regmap cache only on probe() | expand

Commit Message

Mark Brown July 7, 2021, 4:02 p.m. UTC
Currently the tlv320aic31xx driver has regulator support but does not
enable the regulators during probe, deferring this until something causes
ASoC to make the card active. It does put the device into cache only mode
but only when the component level probe is called, however if interrupts
are in use the driver will access the regmap before then which if the
regulators are not powered on would cause I/O problems.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/codecs/tlv320aic31xx.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mark Brown July 12, 2021, 10:45 a.m. UTC | #1
On Wed, 7 Jul 2021 17:02:34 +0100, Mark Brown wrote:
> Currently the tlv320aic31xx driver has regulator support but does not
> enable the regulators during probe, deferring this until something causes
> ASoC to make the card active. It does put the device into cache only mode
> but only when the component level probe is called, however if interrupts
> are in use the driver will access the regmap before then which if the
> regulators are not powered on would cause I/O problems.

Applied to

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

Thanks!

[1/1] ASoC: tlv320aic31xx: Make regmap cache only on probe()
      commit: 6c621b811f99feb3941f04b386795b45f47cd771

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
diff mbox series

Patch

diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index 51870d50f419..b504d63385b3 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1604,6 +1604,8 @@  static int aic31xx_i2c_probe(struct i2c_client *i2c,
 			ret);
 		return ret;
 	}
+	regcache_cache_only(aic31xx->regmap, true);
+
 	aic31xx->dev = &i2c->dev;
 	aic31xx->irq = i2c->irq;