summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-06-04 11:04:28 +0800
committerNicolin Chen <b42378@freescale.com>2013-06-06 17:10:57 +0800
commit08cb585c985a82c69f2bd0d27a31f0e0fd1ff7e1 (patch)
tree6547865f92ad4d232da6220710c5dac46712981c /sound
parent04712563ed030cefa427c2c3d97a8bb53353511f (diff)
ENGR00265649 ASoC: codec: wm8962: disable sysclk to update registers safely
There was an infinitesimal chance that SYSCLK_SRC can't be updated in time, then the driver would prompt timeout error and never work again. Disable SYSCLK so that registers can be more safely updated, and let DAPM handle SYSCLK_ENA's open/close since the dirver's already registered a DAPM supply for it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8962.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index c8ded7abd746..d71fd553f957 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3830,6 +3830,17 @@ static int wm8962_runtime_resume(struct device *dev)
wm8962_reset(wm8962);
/*
+ * Disable SYSCLK so that registers can be more safely updated.
+ * We put this line here is to pervent an infinitesimal chance that
+ * SYSCLK_SRC can't be updated in time, then the driver would prompt
+ * timeout error and never work again.
+ * And don't worry about the SYSCLK_ENA bit because the driver already
+ * registered a DAPM supply for it, DAPM would enable the bit when it
+ * needs to.
+ */
+ regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2, WM8962_SYSCLK_ENA, 0);
+
+ /*
* WM8962_CLOCKING2 is a volatile register so its value would be set to
* default after reset.
*