From c404b25ea3474dd9f4826da40395c5781b78e2c3 Mon Sep 17 00:00:00 2001 From: Yeleswarapu Nagaradhesh Date: Thu, 14 Jul 2016 01:17:05 +0530 Subject: 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 --- include/linux/mfd/wcd9xxx/core.h | 2 ++ include/linux/mfd/wcd9xxx/wcd9xxx-utils.h | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'include/linux') 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; -- cgit v1.2.3