Add support for TAS2558
authorTracy Yi <tracy-yi@ti.com>
Mon, 14 Jan 2019 04:13:03 +0000 (12:13 +0800)
committerTracy Yi <tracy-yi@ti.com>
Mon, 14 Jan 2019 04:31:57 +0000 (12:31 +0800)
Signed-off-by: Tracy Yi <tracy-yi@ti.com>
Kconfig
tas2562-codec.c
tas2562.h

diff --git a/Kconfig b/Kconfig
index f3a79ed90af7edbd437449b031a738851c6aab1a..6b81f40359932d63bcc779c73bbd0541d70e76da 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -12,4 +12,6 @@ config TAS2562_CODEC
 #config TAS2562_MISC
 #    bool "Misc Driver support"
 
+#config TAS2558_CODEC
+
 endif # SND_SOC_TAS2562
index 1e917e63ea2081be49af6e9403bfc0f8ba8d1f48..542876cdc33c4f9368d216c7508a97b330f94e71 100644 (file)
@@ -765,6 +765,15 @@ static int tas2562_load_init(struct tas2562_priv *pTAS2562)
 {
        int ret;
 
+#ifdef TAS2558_CODEC
+/* Max voltage to 9V */
+       ret = pTAS2562->update_bits(pTAS2562, TAS2562_BoostConfiguration2,
+                                       TAS2562_BoostConfiguration2_BoostMaxVoltage_Mask,
+                                       0x7);
+       if(ret < 0)
+               return ret;
+#endif
+
        ret = pTAS2562->write(pTAS2562, TAS2562_MiscConfigurationReg0, 0xcf);
        if(ret < 0)
                return ret;
index d584126788c07836687db73f75bff9b7438ca6a7..fd597167c1fd8978631fc4d22638303df57cb6e1 100644 (file)
--- a/tas2562.h
+++ b/tas2562.h
@@ -499,6 +499,9 @@ TAS2562_InterruptConfiguration_PININTConfig10_Assert2msOnLatchedInterrupts \
 #define TAS2562_MiscIRQ_IRQZBITBANG_IRQZInputBuf0  (0x0 << 0)
 #define TAS2562_MiscIRQ_IRQZBITBANG_IRQZInputBuf1  (0x1 << 0)
 
+#define TAS2562_BoostConfiguration2 TAS2562_REG(0x0, 0x0, 0x34)
+#define TAS2562_BoostConfiguration2_BoostMaxVoltage_Mask  (0x0f << 0)
+
 #define TAS2562_BoostSlope TAS2562_REG(0x0, 0x0, 0x35)
 #define TAS2562_BoostSlope_Mask        (0x3 << 2)
 #define TAS2562_BoostSlope_3AV         (0x1 << 2)