aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8731.h')
-rw-r--r--sound/soc/codecs/wm8731.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8731.h b/sound/soc/codecs/wm8731.h
index 4fcf1226d7c2..8d5a7a9ca6b2 100644
--- a/sound/soc/codecs/wm8731.h
+++ b/sound/soc/codecs/wm8731.h
@@ -12,6 +12,13 @@
#ifndef _WM8731_H
#define _WM8731_H
+#include <linux/mutex.h>
+#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
+
+struct clk;
+struct snd_pcm_hw_constraint_list;
+
/* WM8731 register space */
#define WM8731_LINVOL 0x00
@@ -33,4 +40,24 @@
#define WM8731_DAI 0
+#define WM8731_NUM_SUPPLIES 4
+
+/* codec private data */
+struct wm8731_priv {
+ struct regmap *regmap;
+ struct clk *mclk;
+ struct regulator_bulk_data supplies[WM8731_NUM_SUPPLIES];
+ const struct snd_pcm_hw_constraint_list *constraints;
+ unsigned int sysclk;
+ int sysclk_type;
+ int playback_fs;
+ bool deemph;
+
+ struct mutex lock;
+};
+
+extern const struct regmap_config wm8731_regmap;
+
+int wm8731_init(struct device *dev, struct wm8731_priv *wm8731);
+
#endif