]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next
authorMark Brown <broonie@linaro.org>
Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 17 Jun 2013 16:20:32 +0000 (17:20 +0100)
1  2 
sound/soc/codecs/wm8962.c

index 4b7915bec2f13b4d52e6a1076f3accb9d9708815,dfaf592d2fc9e286ecf61b00d9e0aafcb3d827ea..b1dc7d4264385f9f67ca9df57d15f33c88b09add
@@@ -3721,19 -3758,23 +3758,34 @@@ static int wm8962_runtime_resume(struc
  
        wm8962_reset(wm8962);
  
+       /* SYSCLK defaults to on; make sure it is off so we can safely
+        * write to registers if the device is declocked.
+        */
+       regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2,
+                          WM8962_SYSCLK_ENA, 0);
+       /* Ensure we have soft control over all registers */
+       regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2,
+                          WM8962_CLKREG_OVD, WM8962_CLKREG_OVD);
+       /* Ensure that the oscillator and PLLs are disabled */
+       regmap_update_bits(wm8962->regmap, WM8962_PLL2,
+                          WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA,
+                          0);
        regcache_sync(wm8962->regmap);
  
 +      regmap_update_bits(wm8962->regmap, WM8962_ANTI_POP,
 +                         WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA,
 +                         WM8962_STARTUP_BIAS_ENA | WM8962_VMID_BUF_ENA);
 +
 +      /* Bias enable at 2*5k (fast start-up) */
 +      regmap_update_bits(wm8962->regmap, WM8962_PWR_MGMT_1,
 +                         WM8962_BIAS_ENA | WM8962_VMID_SEL_MASK,
 +                         WM8962_BIAS_ENA | 0x180);
 +
 +      msleep(5);
 +
        return 0;
  }