From 2cf4691ce705eddd88efe7d060076d43a695ffae Mon Sep 17 00:00:00 2001 From: Vatsal Bucha Date: Wed, 25 Aug 2021 09:35:45 +0530 Subject: [PATCH] ASoC: wcd937x: Change resistor divider output for hph if fab id is enabled Depending on efuse reg value, if fab id is enabled, change resistor divider output to P12 for both hphl and hphr. Change-Id: If5e0caac2648f6e0b8c089bb56883a442b5a8ecd Signed-off-by: Vatsal Bucha --- asoc/codecs/wcd937x/wcd937x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index 07b116898fab..36cc8acd09f4 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -180,9 +180,16 @@ static int wcd937x_init_reg(struct snd_soc_component *component) 0xFF, 0xFA); /* Set VBG Voltage to P0.5V for Tanggu second source */ if (snd_soc_component_read32(component, WCD937X_DIGITAL_EFUSE_REG_16) - == 0x01) + == 0x01) { snd_soc_component_update_bits(component, WCD937X_BIAS_VBG_FINE_ADJ, 0xF0, 0xB0); + } else if (snd_soc_component_read32(component, + WCD937X_DIGITAL_EFUSE_REG_16) == 0x02) { + snd_soc_component_update_bits(component, + WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L, 0x1F, 0x04); + snd_soc_component_update_bits(component, + WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_R, 0x1F, 0x04); + } return 0; }