summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/adau17x1.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-21 20:53:51 +0300
committerMark Brown <broonie@kernel.org>2014-11-21 21:17:50 +0300
commitdee9cec42fc9cc4635ea2f45939e443210a638f8 (patch)
tree4dc001051580be8355f678f64879d0242c39cd63 /sound/soc/codecs/adau17x1.c
parenta3a1ec66d6c9320e676fc99dbaf18db4f8dcda93 (diff)
downloadlinux-dee9cec42fc9cc4635ea2f45939e443210a638f8.tar.xz
ASoC: adau17x1: Mark DSP parameter memory as readable and precious
To be able to read back data from the DSP parameter memory the register range needs to be marked as readable. At the same time we do not want them to e.g. appear in debugfs output so mark them as precious as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/adau17x1.c')
-rw-r--r--sound/soc/codecs/adau17x1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c
index 1cab34c57413..50000477dc2a 100644
--- a/sound/soc/codecs/adau17x1.c
+++ b/sound/soc/codecs/adau17x1.c
@@ -706,8 +706,22 @@ int adau17x1_set_micbias_voltage(struct snd_soc_codec *codec,
}
EXPORT_SYMBOL_GPL(adau17x1_set_micbias_voltage);
+bool adau17x1_precious_register(struct device *dev, unsigned int reg)
+{
+ /* SigmaDSP parameter memory */
+ if (reg < 0x400)
+ return true;
+
+ return false;
+}
+EXPORT_SYMBOL_GPL(adau17x1_precious_register);
+
bool adau17x1_readable_register(struct device *dev, unsigned int reg)
{
+ /* SigmaDSP parameter memory */
+ if (reg < 0x400)
+ return true;
+
switch (reg) {
case ADAU17X1_CLOCK_CONTROL:
case ADAU17X1_PLL_CONTROL: