Merge branch 'fix/wm8962' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorMark Brown <broonie@linaro.org>
Fri, 14 Jun 2013 09:16:06 +0000 (10:16 +0100)
committerMark Brown <broonie@linaro.org>
Fri, 14 Jun 2013 09:16:06 +0000 (10:16 +0100)
Conflicts:
sound/soc/codecs/wm8962.c

1  2 
sound/soc/codecs/wm8962.c

index 7a7a0567e54786ce5be061858e88413af76fd9fe,730dd0c0f0ab70ad62ed4865a1c305d9a71870cb..dfaf592d2fc9e286ecf61b00d9e0aafcb3d827ea
@@@ -3423,28 -3422,31 +3424,29 @@@ static int wm8962_probe(struct snd_soc_
                            WM8962_OSC_ENA | WM8962_PLL2_ENA | WM8962_PLL3_ENA,
                            0);
  
 -      if (pdata) {
 -              /* Apply static configuration for GPIOs */
 -              for (i = 0; i < ARRAY_SIZE(pdata->gpio_init); i++)
 -                      if (pdata->gpio_init[i]) {
 -                              wm8962_set_gpio_mode(codec, i + 1);
 -                              snd_soc_write(codec, 0x200 + i,
 -                                            pdata->gpio_init[i] & 0xffff);
 -                      }
 +      /* Apply static configuration for GPIOs */
 +      for (i = 0; i < ARRAY_SIZE(pdata->gpio_init); i++)
 +              if (pdata->gpio_init[i]) {
 +                      wm8962_set_gpio_mode(codec, i + 1);
 +                      snd_soc_write(codec, 0x200 + i,
 +                                      pdata->gpio_init[i] & 0xffff);
 +              }
  
 -              /* Put the speakers into mono mode? */
 -              if (pdata->spk_mono)
 -                      snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_2,
++
 +      /* Put the speakers into mono mode? */
 +      if (pdata->spk_mono)
-               reg_cache[WM8962_CLASS_D_CONTROL_2]
-                       |= WM8962_SPK_MONO;
++              snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_2,
+                               WM8962_SPK_MONO_MASK, WM8962_SPK_MONO);
  
 -
 -              /* Micbias setup, detection enable and detection
 -               * threasholds. */
 -              if (pdata->mic_cfg)
 -                      snd_soc_update_bits(codec, WM8962_ADDITIONAL_CONTROL_4,
 -                                          WM8962_MICDET_ENA |
 -                                          WM8962_MICDET_THR_MASK |
 -                                          WM8962_MICSHORT_THR_MASK |
 -                                          WM8962_MICBIAS_LVL,
 -                                          pdata->mic_cfg);
 -      }
 +      /* Micbias setup, detection enable and detection
 +       * threasholds. */
 +      if (pdata->mic_cfg)
 +              snd_soc_update_bits(codec, WM8962_ADDITIONAL_CONTROL_4,
 +                                  WM8962_MICDET_ENA |
 +                                  WM8962_MICDET_THR_MASK |
 +                                  WM8962_MICSHORT_THR_MASK |
 +                                  WM8962_MICBIAS_LVL,
 +                                  pdata->mic_cfg);
  
        /* Latch volume update bits */
        snd_soc_update_bits(codec, WM8962_LEFT_INPUT_VOLUME,