@@ -1961,7 +1961,13 @@ static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int re
19611961
19621962static int wm8962_reset (struct snd_soc_codec * codec )
19631963{
1964- return snd_soc_write (codec , WM8962_SOFTWARE_RESET , 0x6243 );
1964+ int ret ;
1965+
1966+ ret = snd_soc_write (codec , WM8962_SOFTWARE_RESET , 0x6243 );
1967+ if (ret != 0 )
1968+ return ret ;
1969+
1970+ return snd_soc_write (codec , WM8962_PLL_SOFTWARE_RESET , 0 );
19651971}
19661972
19671973static const DECLARE_TLV_DB_SCALE (inpga_tlv , -2325 , 75 , 0 ) ;
@@ -2360,15 +2366,14 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,
23602366
23612367 snd_soc_update_bits (codec , WM8962_FLL_CONTROL_1 ,
23622368 WM8962_FLL_ENA , WM8962_FLL_ENA );
2363- if (wm8962 -> irq ) {
2364- timeout = msecs_to_jiffies (5 );
2365- timeout = wait_for_completion_timeout (& wm8962 -> fll_lock ,
2366- timeout );
2367-
2368- if (timeout == 0 )
2369- dev_err (codec -> dev ,
2370- "Timed out starting FLL\n" );
2371- }
2369+
2370+ timeout = msecs_to_jiffies (5 );
2371+ timeout = wait_for_completion_timeout (& wm8962 -> fll_lock ,
2372+ timeout );
2373+
2374+ if (wm8962 -> irq && timeout == 0 )
2375+ dev_err (codec -> dev ,
2376+ "Timed out starting FLL\n" );
23722377 }
23732378 break ;
23742379
@@ -4029,6 +4034,11 @@ static int wm8962_probe(struct snd_soc_codec *codec)
40294034 snd_soc_update_bits (codec , WM8962_CLOCKING2 ,
40304035 WM8962_CLKREG_OVD , WM8962_CLKREG_OVD );
40314036
4037+ /* Ensure that the oscillator and PLLs are disabled */
4038+ snd_soc_update_bits (codec , WM8962_PLL2 ,
4039+ WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA ,
4040+ 0 );
4041+
40324042 regulator_bulk_disable (ARRAY_SIZE (wm8962 -> supplies ), wm8962 -> supplies );
40334043
40344044 if (pdata ) {
0 commit comments