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 10/11] ASoc: wm8994: Remove the set_cache_io() entirely from ASoC probe.
Date: Wed, 26 Mar 2014 13:40:32 +0800	[thread overview]
Message-ID: <1395812433-26410-11-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/wm8994.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 6303537..daa4edc 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -3999,8 +3999,6 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
 
 	wm8994->hubs.codec = codec;
 
-	snd_soc_codec_set_cache_io(codec, control->regmap);
-
 	mutex_init(&wm8994->accdet_lock);
 	INIT_DELAYED_WORK(&wm8994->jackdet_bootstrap,
 			  wm1811_jackdet_bootstrap);
@@ -4434,11 +4432,19 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
 	return 0;
 }
 
+struct regmap *wm8994_get_regmap(struct device *dev)
+{
+	struct wm8994 *control = dev_get_drvdata(dev->parent);
+
+	return control->regmap;
+}
+
 static struct snd_soc_codec_driver soc_codec_dev_wm8994 = {
 	.probe =	wm8994_codec_probe,
 	.remove =	wm8994_codec_remove,
 	.suspend =	wm8994_codec_suspend,
 	.resume =	wm8994_codec_resume,
+	.get_regmap =   wm8994_get_regmap,
 	.set_bias_level = wm8994_set_bias_level,
 };
 
-- 
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 ` [PATCHv2 09/11] ASoc: wm8400: " Xiubo Li
2014-03-26  5:40 ` Xiubo Li [this message]
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-11-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.