summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>2016-07-31 15:10:55 -0700
committerYeleswarapu Nagaradhesh <nagaradh@codeaurora.org>2016-09-15 09:10:08 -0700
commit971aeb6addbb05a9fb36cea699990e4cdd83bedd (patch)
treecc7463e9ed6839001a981c99b8eb8dc5dd9a8b56 /include/linux
parent9b82a4c5896632b62140d1ddda55638fea254007 (diff)
ASoC: wcd: modify tasha version check macros
TASHA_IS_1_1 macro checks only for version number. This macro returns true for tavil codec. So modify tasha macros to check for codec and version. CRs-Fixed: 1066331 Change-Id: I5240e0ee888187a8185974ea288ce2cad62bd776 Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/wcd9xxx/core.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/linux/mfd/wcd9xxx/core.h b/include/linux/mfd/wcd9xxx/core.h
index f595275e9d42..c6f6253f477a 100644
--- a/include/linux/mfd/wcd9xxx/core.h
+++ b/include/linux/mfd/wcd9xxx/core.h
@@ -53,12 +53,18 @@
#define TASHA_VERSION_1_0 0
#define TASHA_VERSION_1_1 1
#define TASHA_VERSION_2_0 2
-#define TASHA_IS_1_0(ver) \
- ((ver == TASHA_VERSION_1_0) ? 1 : 0)
-#define TASHA_IS_1_1(ver) \
- ((ver == TASHA_VERSION_1_1) ? 1 : 0)
-#define TASHA_IS_2_0(ver) \
- ((ver == TASHA_VERSION_2_0) ? 1 : 0)
+
+#define TASHA_IS_1_0(wcd) \
+ ((wcd->type == WCD9335 || wcd->type == WCD9326) ? \
+ ((wcd->version == TASHA_VERSION_1_0) ? 1 : 0) : 0)
+
+#define TASHA_IS_1_1(wcd) \
+ ((wcd->type == WCD9335 || wcd->type == WCD9326) ? \
+ ((wcd->version == TASHA_VERSION_1_1) ? 1 : 0) : 0)
+
+#define TASHA_IS_2_0(wcd) \
+ ((wcd->type == WCD9335 || wcd->type == WCD9326) ? \
+ ((wcd->version == TASHA_VERSION_2_0) ? 1 : 0) : 0)
#define IS_CODEC_TYPE(wcd, wcdtype) \
((wcd->type == wcdtype) ? true : false)