From 1b39bf3468e03016ffdcadef3dac1fd75d2db6fa Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 29 Dec 2011 12:18:53 +0000 Subject: [PATCH] ASoC: Enable ASoC register map dump for some regmap CODECs It's still useful to be able to poke around in the register map at runtime. Signed-off-by: Mark Brown --- sound/soc/codecs/wm5100.c | 9 +++++++++ sound/soc/codecs/wm8962.c | 9 +++++++++ sound/soc/codecs/wm8994.c | 8 ++++++++ sound/soc/codecs/wm8996.c | 8 ++++++++ 4 files changed, 34 insertions(+) diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index a234b70377fc..8b24323d6b2c 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2568,6 +2568,13 @@ static int wm5100_remove(struct snd_soc_codec *codec) return 0; } +static int wm5100_soc_volatile(struct snd_soc_codec *codec, + unsigned int reg) +{ + return true; +} + + static struct snd_soc_codec_driver soc_codec_dev_wm5100 = { .probe = wm5100_probe, .remove = wm5100_remove, @@ -2576,6 +2583,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm5100 = { .set_pll = wm5100_set_fll, .set_bias_level = wm5100_set_bias_level, .idle_bias_off = 1, + .reg_cache_size = WM5100_MAX_REGISTER, + .volatile_register = wm5100_soc_volatile, .seq_notifier = wm5100_seq_notifier, .controls = wm5100_snd_controls, diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index be35b6468cb1..1be4eb364128 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -4123,11 +4123,20 @@ static int wm8962_remove(struct snd_soc_codec *codec) return 0; } +static int wm8962_soc_volatile(struct snd_soc_codec *codec, + unsigned int reg) +{ + return true; +} + + static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { .probe = wm8962_probe, .remove = wm8962_remove, .set_bias_level = wm8962_set_bias_level, .set_pll = wm8962_set_fll, + .reg_cache_size = WM8962_MAX_REGISTER, + .volatile_register = wm8962_soc_volatile, }; static const struct regmap_config wm8962_regmap = { diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 71472b626750..93d27b660257 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -3815,12 +3815,20 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec) return 0; } +static int wm8994_soc_volatile(struct snd_soc_codec *codec, + unsigned int reg) +{ + return true; +} + static struct snd_soc_codec_driver soc_codec_dev_wm8994 = { .probe = wm8994_codec_probe, .remove = wm8994_codec_remove, .suspend = wm8994_suspend, .resume = wm8994_resume, .set_bias_level = wm8994_set_bias_level, + .reg_cache_size = WM8994_MAX_REGISTER, + .volatile_register = wm8994_soc_volatile, }; static int __devinit wm8994_probe(struct platform_device *pdev) diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index da7acaefa9d9..d8da10fe5b52 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -3039,6 +3039,12 @@ static int wm8996_remove(struct snd_soc_codec *codec) return 0; } +static int wm8996_soc_volatile_register(struct snd_soc_codec *codec, + unsigned int reg) +{ + return true; +} + static struct snd_soc_codec_driver soc_codec_dev_wm8996 = { .probe = wm8996_probe, .remove = wm8996_remove, @@ -3051,6 +3057,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8996 = { .dapm_routes = wm8996_dapm_routes, .num_dapm_routes = ARRAY_SIZE(wm8996_dapm_routes), .set_pll = wm8996_set_fll, + .reg_cache_size = WM8996_MAX_REGISTER, + .volatile_register = wm8996_soc_volatile_register, }; #define WM8996_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ -- GitLab