mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>
Cc: <alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>,
	Misael Lopez Cruz <misael.lopez@ti.com>
Subject: [PATCH 4/5] ASoC: twl6040: Remove register restore functionality
Date: Fri, 29 Nov 2013 16:03:46 +0200	[thread overview]
Message-ID: <1385733827-19831-5-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1385733827-19831-1-git-send-email-peter.ujfalusi@ti.com>

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>
---
 sound/soc/codecs/twl6040.c | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index fb8c65b..b07839b 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -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,
@@ -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)
 {
@@ -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;
-- 
1.8.4.2


  parent reply	other threads:[~2013-11-29 14:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 14:03 [PATCH 0/5] ASoC/MFD: twl6040: Remove codec driver local reg cache Peter Ujfalusi
2013-11-29 14:03 ` [PATCH 1/5] ASoC: twl6040: Rename twl6040_is_path_unmuted -> twl6040_can_write_to_chip Peter Ujfalusi
2013-11-29 14:03 ` [PATCH 2/5] ASoC: twl6040: Custom caching for sensitive DL1/2 path registers Peter Ujfalusi
2013-11-29 14:03 ` [PATCH 3/5] MFD: twl6040: reg_defaults support for regmap Peter Ujfalusi
2013-11-29 16:00   ` Lee Jones
2013-11-29 16:04     ` Mark Brown
2013-12-18 18:56     ` Mark Brown
2013-12-19  9:06       ` Lee Jones
2013-12-19 10:52         ` Mark Brown
2013-12-19 17:20           ` Lee Jones
2013-12-19 18:31             ` Mark Brown
2013-11-29 14:03 ` Peter Ujfalusi [this message]
2013-11-29 14:03 ` [PATCH 5/5] ASoC: twl6040: Remove self managed local reg_cache support Peter Ujfalusi
2013-11-29 14:49 ` [PATCH 0/5] ASoC/MFD: twl6040: Remove codec driver local reg cache Mark Brown
2013-12-19 18:37 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1385733827-19831-5-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=misael.lopez@ti.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®