diff options
author | Adam Thomson <Adam.Thomson.Opensource@diasemi.com> | 2018-03-09 17:25:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-03-09 18:40:41 +0100 |
commit | fc8f7ea2d6c074baaad202c9187962bfa493ef13 (patch) | |
tree | 44dea6701558da4ca58f5c89309451b9c5155506 /sound/soc/codecs/da7219.h | |
parent | ASoC: Intel: bytcr_rt5651: Select RCCLK on init() (diff) | |
download | linux-fc8f7ea2d6c074baaad202c9187962bfa493ef13.tar.xz linux-fc8f7ea2d6c074baaad202c9187962bfa493ef13.zip |
ASoC: da7219: Add common clock usage for providing DAI clks
There is a need to use DA7219 as DAI clock master for other codecs
within a system, which means that the DAI clocks are required to
remain, regardless of whether the codec is actually running
playback/capture. To be able to expose control of the DAI clocking
the common clock framework has been employed.
The current implementation adds a simple clock gate for enabling
and disabling the DAI clocks, with no rate control supported
(this is still handled through standard hw_params() functions as
before). If DT is enabled then the clock is added to the OF
providers list, otherwise a clkdev lookup is used.
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7219.h')
-rw-r--r-- | sound/soc/codecs/da7219.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219.h b/sound/soc/codecs/da7219.h index 1acb34cd12ad..1b00023e33cd 100644 --- a/sound/soc/codecs/da7219.h +++ b/sound/soc/codecs/da7219.h @@ -14,6 +14,9 @@ #ifndef __DA7219_H #define __DA7219_H +#include <linux/clk.h> +#include <linux/clkdev.h> +#include <linux/clk-provider.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> #include <sound/da7219.h> @@ -813,6 +816,12 @@ struct da7219_priv { struct mutex ctrl_lock; struct mutex pll_lock; +#ifdef CONFIG_COMMON_CLK + struct clk_hw dai_clks_hw; +#endif + struct clk_lookup *dai_clks_lookup; + struct clk *dai_clks; + struct clk *mclk; unsigned int mclk_rate; int clk_src; |