summaryrefslogtreecommitdiff
path: root/include/sound/wm8962.h
diff options
context:
space:
mode:
authorNicolin Chen <nicoleotsuka@gmail.com>2014-07-29 14:38:39 +0400
committerMark Brown <broonie@linaro.org>2014-07-31 23:51:26 +0400
commitd7821953cfe9803c593a682320468ce2de862803 (patch)
tree4919f011ce7e05397a6e40c5de782ada5269cd8d /include/sound/wm8962.h
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadlinux-d7821953cfe9803c593a682320468ce2de862803.tar.xz
ASoC: wm8962: Let CODEC driver enable and disable its own MCLK
snd_soc_open() will trigger pm_runtime resume() which will then enable the regulator and initialization. So we should make sure the MCLK is enabled before this resume(). Previously we let the machine driver get the clock and enable it in its probe(). However, considering about power saving, it'll be better to enable it when it's going to be used and disable it after using. So this patch just simply adds clk_get() and clk_enable() to WM8962 driver. Meanwhile, it marks clock pointer to NULL if no clock assigned to it so it will not break any current function. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/sound/wm8962.h')
-rw-r--r--include/sound/wm8962.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/wm8962.h b/include/sound/wm8962.h
index 79e6d427b858..0af7c1674cbf 100644
--- a/include/sound/wm8962.h
+++ b/include/sound/wm8962.h
@@ -37,6 +37,7 @@
#define WM8962_GPIO_FN_MICSCD 22
struct wm8962_pdata {
+ struct clk *mclk;
int gpio_base;
u32 gpio_init[WM8962_MAX_GPIO];