diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-01-15 09:03:22 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-15 12:37:48 +0100 |
commit | 8564295231727c4a05ed2e9b8337fe70afe531ef (patch) | |
tree | fb8ba5c0bc15928279d86875e4684a1f29ce3c48 /sound/soc/sh/rcar/dvc.c | |
parent | ASoC: rsnd: tidyup rsnd_io_to_xxx() macro declaration position (diff) | |
download | linux-8564295231727c4a05ed2e9b8337fe70afe531ef.tar.xz linux-8564295231727c4a05ed2e9b8337fe70afe531ef.zip |
ASoC: rsnd: rsnd_mod controls clock
Current rsnd driver's mod (= ssi/src/dvc) have each own clk,
but, these are needed to start/stop each mod.
This patch adds struct clk in rsnd_mod, and start/stop these
via rsnd_mod_hw_start/stop() macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/dvc.c')
-rw-r--r-- | sound/soc/sh/rcar/dvc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c index 5380a4827ba7..77cb00890471 100644 --- a/sound/soc/sh/rcar/dvc.c +++ b/sound/soc/sh/rcar/dvc.c @@ -17,7 +17,6 @@ struct rsnd_dvc { struct rsnd_dvc_platform_info *info; /* rcar_snd.h */ struct rsnd_mod mod; - struct clk *clk; struct rsnd_kctrl_cfg_m volume; struct rsnd_kctrl_cfg_m mute; struct rsnd_kctrl_cfg_s ren; /* Ramp Enable */ @@ -132,7 +131,6 @@ static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod, static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, struct rsnd_dai *rdai) { - struct rsnd_dvc *dvc = rsnd_mod_to_dvc(dvc_mod); struct rsnd_dai_stream *io = rsnd_mod_to_io(dvc_mod); struct rsnd_priv *priv = rsnd_mod_to_priv(dvc_mod); struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io); @@ -153,7 +151,7 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, return -EINVAL; } - clk_prepare_enable(dvc->clk); + rsnd_mod_hw_start(dvc_mod); /* * fixme @@ -181,9 +179,7 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod, static int rsnd_dvc_quit(struct rsnd_mod *mod, struct rsnd_dai *rdai) { - struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod); - - clk_disable_unprepare(dvc->clk); + rsnd_mod_hw_stop(mod); return 0; } @@ -356,9 +352,9 @@ int rsnd_dvc_probe(struct platform_device *pdev, return PTR_ERR(clk); dvc->info = &info->dvc_info[i]; - dvc->clk = clk; - rsnd_mod_init(priv, &dvc->mod, &rsnd_dvc_ops, RSND_MOD_DVC, i); + rsnd_mod_init(priv, &dvc->mod, &rsnd_dvc_ops, + clk, RSND_MOD_DVC, i); dev_dbg(dev, "CMD%d probed\n", i); } |