All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <Li.Xiubo@freescale.com>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, lars@metafoo.de, shc_work@mail.ru,
	tiwai@suse.de, viresh.kumar@linaro.org,
	patches@opensource.wolfsonmicro.com, andrew.smirnov@gmail.com,
	Xiubo Li <Li.Xiubo@freescale.com>,
	akpm@linux-foundation.org, s.trumtrar@pengutronix.de,
	rf@opensource.wolfsonmicro.com,
	ckeepax@opensource.wolfsonmicro.com, vinod.koul@intel.com
Subject: [PATCHv2 09/11] ASoc: wm8400: Remove the set_cache_io() entirely from ASoC probe.
Date: Wed, 26 Mar 2014 13:40:31 +0800	[thread overview]
Message-ID: <1395812433-26410-10-git-send-email-Li.Xiubo@freescale.com> (raw)
In-Reply-To: <1395812433-26410-1-git-send-email-Li.Xiubo@freescale.com>

As we can set the CODEC I/O while snd_soc_register_codec(), so the
calling of set_cache_io() from CODEC ASoC probe could be removed
entirely.

And then we can set the CODEC I/O in the device probe instead of
CODEC ASoC probe as earily as possible.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/codecs/wm8400.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 146564f..e6410f2 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -1318,8 +1318,6 @@ static int wm8400_codec_probe(struct snd_soc_codec *codec)
 	priv->wm8400 = wm8400;
 	priv->codec = codec;
 
-	snd_soc_codec_set_cache_io(codec, wm8400->regmap);
-
 	ret = devm_regulator_bulk_get(wm8400->dev,
 				 ARRAY_SIZE(power), &power[0]);
 	if (ret != 0) {
@@ -1361,11 +1359,19 @@ static int  wm8400_codec_remove(struct snd_soc_codec *codec)
 	return 0;
 }
 
+struct regmap *wm8400_get_regmap(struct device *dev)
+{
+	struct wm8400 *wm8400 = dev_get_platdata(dev);
+
+	return wm8400->regmap;
+}
+
 static struct snd_soc_codec_driver soc_codec_dev_wm8400 = {
 	.probe =	wm8400_codec_probe,
 	.remove =	wm8400_codec_remove,
 	.suspend =	wm8400_suspend,
 	.resume =	wm8400_resume,
+	.get_regmap =	wm8400_get_regmap,
 	.set_bias_level = wm8400_set_bias_level,
 
 	.controls = wm8400_snd_controls,
-- 
1.8.4

  parent reply	other threads:[~2014-03-26  6:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26  5:40 [PATCHv2 00/11] Remove set_cache_io entirely from ASoC probe Xiubo Li
2014-03-26  5:40 ` [PATCHv2 01/11] ASoC: core: Move the default regmap I/O setting to snd_soc_register_codec() Xiubo Li
2014-03-26  5:40 ` [PATCHv2 02/11] ASoc: 88pm860x: Remove the set_cache_io() entirely from ASoC probe Xiubo Li
2014-03-26  5:40 ` [PATCHv2 03/11] ASoc: cq93vc: " Xiubo Li
2014-03-26  5:40 ` [PATCHv2 04/11] ASoc: mc13783: " Xiubo Li
2014-03-26  5:40 ` [PATCHv2 05/11] ASoc: si476x: " Xiubo Li
2014-03-27 14:41   ` Andrey Smirnov
2014-03-26  5:40 ` [PATCHv2 06/11] ASoc: wm5102: " Xiubo Li
2014-03-26  5:40 ` [PATCHv2 07/11] ASoc: wm5110: " Xiubo Li
2014-03-26  5:40 ` [PATCHv2 08/11] ASoc: wm8350: " Xiubo Li
2014-03-26  5:40 ` Xiubo Li [this message]
2014-03-26  5:40 ` [PATCHv2 10/11] ASoc: wm8994: " Xiubo Li
2014-03-26  5:40 ` [PATCHv2 11/11] ASoc: wm8997: " Xiubo Li
2014-03-27 13:34 ` [PATCHv2 00/11] Remove set_cache_io " Charles Keepax
2014-04-02 19:23 ` 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=1395812433-26410-10-git-send-email-Li.Xiubo@freescale.com \
    --to=li.xiubo@freescale.com \
    --cc=akpm@linux-foundation.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrew.smirnov@gmail.com \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=s.trumtrar@pengutronix.de \
    --cc=shc_work@mail.ru \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.