Skip to content

Commit

Permalink
ASoC: twl6040: Remove register restore functionality
Browse files Browse the repository at this point in the history
The MFD core takes care of the restore via standard regmap API, no need to
do this anymore here.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Dec 19, 2013
1 parent 5350910 commit 79ae513
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,6 @@ static const u8 twl6040_reg[TWL6040_CACHEREGNUM] = {
0x00, /* REG_STATUS 0x2E (ro) */
};

/* List of registers to be restored after power up */
static const int twl6040_restore_list[] = {
TWL6040_REG_MICLCTL,
TWL6040_REG_MICRCTL,
TWL6040_REG_MICGAIN,
TWL6040_REG_LINEGAIN,
TWL6040_REG_HSLCTL,
TWL6040_REG_HSRCTL,
TWL6040_REG_HSGAIN,
TWL6040_REG_EARCTL,
TWL6040_REG_HFLCTL,
TWL6040_REG_HFLGAIN,
TWL6040_REG_HFRCTL,
TWL6040_REG_HFRGAIN,
};

/* set of rates for each pll: low-power and high-performance */
static unsigned int lp_rates[] = {
8000,
Expand Down Expand Up @@ -335,17 +319,6 @@ static void twl6040_init_chip(struct snd_soc_codec *codec)
twl6040_write_reg_cache(codec, TWL6040_REG_LINEGAIN, 0);
}

static void twl6040_restore_regs(struct snd_soc_codec *codec)
{
u8 *cache = codec->reg_cache;
int reg, i;

for (i = 0; i < ARRAY_SIZE(twl6040_restore_list); i++) {
reg = twl6040_restore_list[i];
twl6040_write(codec, reg, cache[reg]);
}
}

/* set headset dac and driver power mode */
static int headset_power_mode(struct snd_soc_codec *codec, int high_perf)
{
Expand Down Expand Up @@ -978,8 +951,6 @@ static int twl6040_set_bias_level(struct snd_soc_codec *codec,

priv->codec_powered = 1;

twl6040_restore_regs(codec);

/* Set external boost GPO */
twl6040_write(codec, TWL6040_REG_GPOCTL, 0x02);
break;
Expand Down

0 comments on commit 79ae513

Please sign in to comment.