summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/da7213.h
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2015-10-07 14:27:11 +0100
committerMark Brown <broonie@kernel.org>2015-10-07 15:11:34 +0100
commit6e7c444318699496e6e6f30c875cf67534aeccc6 (patch)
tree0b9beecf8772bd3047029e6a1f73bd40adde2ed4 /sound/soc/codecs/da7213.h
parente90996a3ea224fbeb459b8052ecd366d7990e1f3 (diff)
downloadlinux-6e7c444318699496e6e6f30c875cf67534aeccc6.tar.bz2
ASoC: da7213: Add support to handle mclk data provided to driver
Driver now can make use of mclk data, if provided, to set, enable and disable the clock source. As part of this, the choice to enable clock squaring is dealt with as part of dai_sysclk() call rather than as platform data. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/da7213.h')
-rw-r--r--sound/soc/codecs/da7213.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/codecs/da7213.h b/sound/soc/codecs/da7213.h
index 9cb9ddd01282..030fd691b076 100644
--- a/sound/soc/codecs/da7213.h
+++ b/sound/soc/codecs/da7213.h
@@ -13,6 +13,7 @@
#ifndef _DA7213_H
#define _DA7213_H
+#include <linux/clk.h>
#include <linux/regmap.h>
#include <sound/da7213.h>
@@ -504,14 +505,17 @@
#define DA7213_PLL_INDIV_20_40_MHZ_VAL 8
#define DA7213_PLL_INDIV_40_54_MHZ_VAL 16
-enum clk_src {
- DA7213_CLKSRC_MCLK
+enum da7213_clk_src {
+ DA7213_CLKSRC_MCLK = 0,
+ DA7213_CLKSRC_MCLK_SQR,
};
/* Codec private data */
struct da7213_priv {
struct regmap *regmap;
+ struct clk *mclk;
unsigned int mclk_rate;
+ int clk_src;
bool master;
bool mclk_squarer_en;
bool srm_en;