aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@sig21.net>2011-07-11 11:01:24 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-13 11:24:32 -0400
commit889ebae537f5cd3adfd149160b8092217de3cff0 (patch)
tree2a65978902a499f3bf62dc6a8c85c1ce03cced6c
parent796884391504426e9da15bdf76f73c5f4eda3714 (diff)
ASoC: STA32x: Preserve reserved register bits
Chip documentation explicitly requires that the reset values of reserved register bits are left untouched. It is possible there are differences between STA326 and STA328 or future chip revisions in these bits, and clobbering them might cause malfunction. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/sta32x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 9bf944ca43a1..409d89d1f34c 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -756,6 +756,22 @@ static int sta32x_probe(struct snd_soc_codec *codec)
756 for (i = 0; i < STA32X_REGISTER_COUNT; i++) 756 for (i = 0; i < STA32X_REGISTER_COUNT; i++)
757 snd_soc_cache_write(codec, i, sta32x_regs[i]); 757 snd_soc_cache_write(codec, i, sta32x_regs[i]);
758 758
759 /* preserve reset values of reserved register bits */
760 snd_soc_cache_write(codec, STA32X_CONFC,
761 codec->hw_read(codec, STA32X_CONFC));
762 snd_soc_cache_write(codec, STA32X_CONFE,
763 codec->hw_read(codec, STA32X_CONFE));
764 snd_soc_cache_write(codec, STA32X_CONFF,
765 codec->hw_read(codec, STA32X_CONFF));
766 snd_soc_cache_write(codec, STA32X_MMUTE,
767 codec->hw_read(codec, STA32X_MMUTE));
768 snd_soc_cache_write(codec, STA32X_AUTO1,
769 codec->hw_read(codec, STA32X_AUTO1));
770 snd_soc_cache_write(codec, STA32X_AUTO3,
771 codec->hw_read(codec, STA32X_AUTO3));
772 snd_soc_cache_write(codec, STA32X_C3CFG,
773 codec->hw_read(codec, STA32X_C3CFG));
774
759 /* FIXME enable thermal warning adjustment and recovery */ 775 /* FIXME enable thermal warning adjustment and recovery */
760 snd_soc_update_bits(codec, STA32X_CONFA, 776 snd_soc_update_bits(codec, STA32X_CONFA,
761 STA32X_CONFA_TWAB | STA32X_CONFA_TWRB, 0); 777 STA32X_CONFA_TWAB | STA32X_CONFA_TWRB, 0);