summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>2016-07-14 01:17:05 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-15 17:01:55 -0700
commitc404b25ea3474dd9f4826da40395c5781b78e2c3 (patch)
treeaedfcafae8f8b66e5c13404a7df207e49b12ca15 /include
parent5be00f77d3d546cee287e061d765ab4cd4aa807e (diff)
ASoC: wcd9xxx: add support for wcd934x codec
Add wcd934x as a mfd child and configure regmap. Configure MCLK as per the HW sequence. CRs-Fixed: 1041199 Change-Id: I9e2dbb0f0acaa1442c1624556bc52abf98158c92 Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/wcd9xxx/core.h2
-rw-r--r--include/linux/mfd/wcd9xxx/wcd9xxx-utils.h22
2 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/mfd/wcd9xxx/core.h b/include/linux/mfd/wcd9xxx/core.h
index c56ad3afcd46..75908dfa8d64 100644
--- a/include/linux/mfd/wcd9xxx/core.h
+++ b/include/linux/mfd/wcd9xxx/core.h
@@ -76,6 +76,7 @@ enum codec_variant {
WCD9330,
WCD9335,
WCD9326,
+ WCD934X,
};
enum wcd9xxx_slim_slave_addr_type {
@@ -252,6 +253,7 @@ enum wcd9xxx_chipid_major {
TOMTOM_MAJOR = cpu_to_le16(0x105),
TASHA_MAJOR = cpu_to_le16(0x0),
TASHA2P0_MAJOR = cpu_to_le16(0x107),
+ TAVIL_MAJOR = cpu_to_le16(0x108),
};
enum codec_power_states {
diff --git a/include/linux/mfd/wcd9xxx/wcd9xxx-utils.h b/include/linux/mfd/wcd9xxx/wcd9xxx-utils.h
index 441d70b97f4e..7c35d7fecc50 100644
--- a/include/linux/mfd/wcd9xxx/wcd9xxx-utils.h
+++ b/include/linux/mfd/wcd9xxx/wcd9xxx-utils.h
@@ -33,6 +33,13 @@ typedef int (*codec_bringdown_fn)(struct wcd9xxx *);
typedef int (*codec_type_fn)(struct wcd9xxx *,
struct wcd9xxx_codec_type *);
+#ifdef CONFIG_WCD934X_CODEC
+extern int wcd934x_bringup(struct wcd9xxx *wcd9xxx);
+extern int wcd934x_bringdown(struct wcd9xxx *wcd9xxx);
+extern int wcd934x_get_codec_info(struct wcd9xxx *,
+ struct wcd9xxx_codec_type *);
+#endif
+
#ifdef CONFIG_WCD9335_CODEC
extern int wcd9335_bringup(struct wcd9xxx *wcd9xxx);
extern int wcd9335_bringdown(struct wcd9xxx *wcd9xxx);
@@ -52,6 +59,11 @@ static inline codec_bringdown_fn wcd9xxx_bringdown_fn(int type)
codec_bringdown_fn cdc_bdown_fn;
switch (type) {
+#ifdef CONFIG_WCD934X_CODEC
+ case WCD934X:
+ cdc_bdown_fn = wcd934x_bringdown;
+ break;
+#endif
#ifdef CONFIG_WCD9335_CODEC
case WCD9335:
cdc_bdown_fn = wcd9335_bringdown;
@@ -75,6 +87,11 @@ static inline codec_bringup_fn wcd9xxx_bringup_fn(int type)
codec_bringup_fn cdc_bup_fn;
switch (type) {
+#ifdef CONFIG_WCD934X_CODEC
+ case WCD934X:
+ cdc_bup_fn = wcd934x_bringup;
+ break;
+#endif
#ifdef CONFIG_WCD9335_CODEC
case WCD9335:
cdc_bup_fn = wcd9335_bringup;
@@ -98,6 +115,11 @@ static inline codec_type_fn wcd9xxx_get_codec_info_fn(int type)
codec_type_fn cdc_type_fn;
switch (type) {
+#ifdef CONFIG_WCD934X_CODEC
+ case WCD934X:
+ cdc_type_fn = wcd934x_get_codec_info;
+ break;
+#endif
#ifdef CONFIG_WCD9335_CODEC
case WCD9335:
cdc_type_fn = wcd9335_get_codec_info;