ASoC/MFD: twl6040: Combine bit definitions for Headset control registers
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 22 Sep 2011 08:05:54 +0000 (11:05 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 22 Sep 2011 16:20:22 +0000 (17:20 +0100)
Use one set of defines for the HS bits, since they are identical in both
control register.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/linux/mfd/twl6040.h
sound/soc/codecs/twl6040.c

index 47470cadf9691d80d4c1b050239794885bb56b9c..d9e05eabef33a2104f9f268406a5843d3df8d16e 100644 (file)
 #define TWL6040_LPLLFIN                        0x08
 #define TWL6040_HPLLSEL                        0x10
 
-/* HSLCTL (0x10) fields */
+/* HSLCTL/R (0x10/0x11) fields */
 
-#define TWL6040_HSDACMODEL             0x02
-#define TWL6040_HSDRVMODEL             0x08
-
-/* HSRCTL (0x11) fields */
-
-#define TWL6040_HSDACMODER             0x02
-#define TWL6040_HSDRVMODER             0x08
+#define TWL6040_HSDACMODE              (1 << 1)
+#define TWL6040_HSDRVMODE              (1 << 3)
 
 /* VIBCTLL (0x18) fields */
 
index 760701e89fa7035c65a18c25b2197b796022bbef..68e52c9282a5cdc7778c7fff2a959bd61643e6f2 100644 (file)
@@ -642,7 +642,7 @@ static int pga_event(struct snd_soc_dapm_widget *w,
 static int headset_power_mode(struct snd_soc_codec *codec, int high_perf)
 {
        int hslctl, hsrctl;
-       int mask = TWL6040_HSDRVMODEL | TWL6040_HSDACMODEL;
+       int mask = TWL6040_HSDRVMODE | TWL6040_HSDACMODE;
 
        hslctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSLCTL);
        hsrctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSRCTL);