ASoC: wcd9310: Update legacy mode, txfe controls based on platform data

Based on tabla platform data update the legacy mode, txfe bypass and
txfe buff mode on tx path.

CRs-Fixed: 308208
Change-Id: I96df7a213578ed8e975030dc8d4b983d03eb6518
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
diff --git a/include/linux/mfd/wcd9310/pdata.h b/include/linux/mfd/wcd9310/pdata.h
index 13d52fb..9ca6a8c 100644
--- a/include/linux/mfd/wcd9310/pdata.h
+++ b/include/linux/mfd/wcd9310/pdata.h
@@ -25,6 +25,23 @@
 #define TABLA_CFILT2_SEL 0x1
 #define TABLA_CFILT3_SEL 0x2
 
+#define MAX_AMIC_CHANNEL 7
+
+struct tabla_amic {
+	/*legacy mode, txfe_enable and txfe_buff take 7 input
+	 * each bit represent the channel / TXFE number
+	 * and numbered as below
+	 * bit 0 = channel 1 / TXFE1_ENABLE / TXFE1_BUFF
+	 * bit 1 = channel 2 / TXFE2_ENABLE / TXFE2_BUFF
+	 * ...
+	 * bit 7 = channel 7 / TXFE7_ENABLE / TXFE7_BUFF
+	 */
+	u8 legacy_mode:MAX_AMIC_CHANNEL;
+	u8 txfe_enable:MAX_AMIC_CHANNEL;
+	u8 txfe_buff:MAX_AMIC_CHANNEL;
+	u8 use_pdata:MAX_AMIC_CHANNEL;
+};
+
 /* Each micbias can be assigned to one of three cfilters
  * Vbatt_min >= .15V + ldoh_v
  * ldoh_v >= .15v + cfiltx_mv
@@ -50,6 +67,7 @@
 	int irq_base;
 	int num_irqs;
 	int reset_gpio;
+	struct tabla_amic amic_settings;
 	struct slim_device slimbus_slave_device;
 	struct tabla_micbias_setting micbias;
 };