mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
parent
7171511eae
commit
d7821953cf
2 changed files with 20 additions and 0 deletions
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue