aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-09-22 04:05:54 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-22 12:20:22 -0400
commitab6cf13943303f865320407b17b0f86095d23ce3 (patch)
tree70058eb2aa7c20a158a90d4ba5a77adcae9a3d52
parentd13f1fe04412b2319a79ff456cf73cc59692f6fb (diff)
ASoC/MFD: twl6040: Combine bit definitions for Headset control registers
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>
-rw-r--r--include/linux/mfd/twl6040.h11
-rw-r--r--sound/soc/codecs/twl6040.c2
2 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/mfd/twl6040.h b/include/linux/mfd/twl6040.h
index 47470cadf969..d9e05eabef33 100644
--- a/include/linux/mfd/twl6040.h
+++ b/include/linux/mfd/twl6040.h
@@ -120,15 +120,10 @@
120#define TWL6040_LPLLFIN 0x08 120#define TWL6040_LPLLFIN 0x08
121#define TWL6040_HPLLSEL 0x10 121#define TWL6040_HPLLSEL 0x10
122 122
123/* HSLCTL (0x10) fields */ 123/* HSLCTL/R (0x10/0x11) fields */
124 124
125#define TWL6040_HSDACMODEL 0x02 125#define TWL6040_HSDACMODE (1 << 1)
126#define TWL6040_HSDRVMODEL 0x08 126#define TWL6040_HSDRVMODE (1 << 3)
127
128/* HSRCTL (0x11) fields */
129
130#define TWL6040_HSDACMODER 0x02
131#define TWL6040_HSDRVMODER 0x08
132 127
133/* VIBCTLL (0x18) fields */ 128/* VIBCTLL (0x18) fields */
134 129
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 760701e89fa7..68e52c9282a5 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -642,7 +642,7 @@ static int pga_event(struct snd_soc_dapm_widget *w,
642static int headset_power_mode(struct snd_soc_codec *codec, int high_perf) 642static int headset_power_mode(struct snd_soc_codec *codec, int high_perf)
643{ 643{
644 int hslctl, hsrctl; 644 int hslctl, hsrctl;
645 int mask = TWL6040_HSDRVMODEL | TWL6040_HSDACMODEL; 645 int mask = TWL6040_HSDRVMODE | TWL6040_HSDACMODE;
646 646
647 hslctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSLCTL); 647 hslctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSLCTL);
648 hsrctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSRCTL); 648 hsrctl = twl6040_read_reg_cache(codec, TWL6040_REG_HSRCTL);