summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/rcar/dvc.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2014-05-23 08:25:43 +0200
committerMark Brown <broonie@linaro.org>2014-05-26 15:34:55 +0200
commit8aefda5046f417c551e3acdeb2cf37949a4b75e9 (patch)
treedf2f55e902e7cd76d85c17b89d0e151bb2907e66 /sound/soc/sh/rcar/dvc.c
parentASoC: rsnd: remove rsnd_src_non_ops (diff)
downloadlinux-8aefda5046f417c551e3acdeb2cf37949a4b75e9.tar.xz
linux-8aefda5046f417c551e3acdeb2cf37949a4b75e9.zip
ASoC: rsnd: module name is unified
Renesas sound driver uses many modules (= SSI/SRC/DVC), and each module had own name. But, each module name can be used as several purpose, like clock name, DMA name etc... This patch uses common name for each module. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r--sound/soc/sh/rcar/dvc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 74769b1be005..ed0007006899 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -13,6 +13,9 @@
#define RSND_DVC_NAME_SIZE 16
#define RSND_DVC_VOLUME_MAX 100
#define RSND_DVC_VOLUME_NUM 2
+
+#define DVC_NAME "dvc"
+
struct rsnd_dvc {
struct rsnd_dvc_platform_info *info; /* rcar_snd.h */
struct rsnd_mod mod;
@@ -43,6 +46,17 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
rsnd_mod_write(mod, DVC_VOL1R, vol[1]);
}
+static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod,
+ struct rsnd_dai *rdai)
+{
+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+ struct device *dev = rsnd_priv_to_dev(priv);
+
+ dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod));
+
+ return 0;
+}
+
static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
struct rsnd_dai *rdai)
{
@@ -208,7 +222,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
}
static struct rsnd_mod_ops rsnd_dvc_ops = {
- .name = "dvc (gen2)",
+ .name = DVC_NAME,
+ .probe = rsnd_dvc_probe_gen2,
.init = rsnd_dvc_init,
.quit = rsnd_dvc_quit,
.start = rsnd_dvc_start,
@@ -255,7 +270,8 @@ int rsnd_dvc_probe(struct platform_device *pdev,
priv->dvc = dvc;
for_each_rsnd_dvc(dvc, priv, i) {
- snprintf(name, RSND_DVC_NAME_SIZE, "dvc.%d", i);
+ snprintf(name, RSND_DVC_NAME_SIZE, "%s.%d",
+ DVC_NAME, i);
clk = devm_clk_get(dev, name);
if (IS_ERR(clk))