From 971aeb6addbb05a9fb36cea699990e4cdd83bedd Mon Sep 17 00:00:00 2001 From: Yeleswarapu Nagaradhesh Date: Sun, 31 Jul 2016 15:10:55 -0700 Subject: 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 --- include/linux/mfd/wcd9xxx/core.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'include/linux') 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) -- cgit v1.2.3