Hi Mark,
On Wed, May 8, 2013 at 12:11 PM, Mark Brown broonie@kernel.org wrote:
Actually the simplest way to implement this solution (at least with regmap, IIRC there might've been some issues with the ASoC cache code) is just to discard the register defaults. The core will fall back to reading the hardware for any register it doesn't have cached but will continue to cache values that are written.
Shouldn't we use defaults_raw with regmap?
The patch below fixes the reset issue for me:
From d9018614781f9a4626d75dabbb495b8b44c74d09 Mon Sep 17 00:00:00 2001
From: Fabio Estevam fabio.estevam@freescale.com Date: Wed, 8 May 2013 12:56:44 -0300 Subject: [PATCH] ASoC: sgtl5000: Use 'defaults_raw'
When using regmap, the 'defaults_raw' variants must be used, as these are the ones checked inside drivers/base/regmap/regcache.c
Signed-off-by: Fabio Estevam fabio.estevam@freescale.com --- sound/soc/codecs/sgtl5000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 327b443..c59fae8 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1470,8 +1470,8 @@ static const struct regmap_config sgtl5000_regmap = { .readable_reg = sgtl5000_readable,
.cache_type = REGCACHE_RBTREE, - .reg_defaults = sgtl5000_reg_defaults, - .num_reg_defaults = ARRAY_SIZE(sgtl5000_reg_defaults), + .reg_defaults_raw = sgtl5000_reg_defaults, + .num_reg_defaults_raw = ARRAY_SIZE(sgtl5000_reg_defaults), };
static int sgtl5000_i2c_probe(struct i2c_client *client,