Browse Source

ASoC: wcd937x: Enable hph OCP

Update registers to enable OCP for HPHL and HPHR.

CRs-Fixed: 2321013
Change-Id: I51a872981ee2dc435757152b9122067944d13924
Signed-off-by: Vatsal Bucha <[email protected]>
Vatsal Bucha 6 years ago
parent
commit
204f59cd14
1 changed files with 4 additions and 0 deletions
  1. 4 0
      asoc/codecs/wcd937x/wcd937x.c

+ 4 - 0
asoc/codecs/wcd937x/wcd937x.c

@@ -118,6 +118,10 @@ static int wcd937x_init_reg(struct snd_soc_codec *codec)
 	snd_soc_update_bits(codec, WCD937X_ANA_BIAS, 0x40, 0x40);
 	usleep_range(10000, 10010);
 	snd_soc_update_bits(codec, WCD937X_ANA_BIAS, 0x40, 0x00);
+	snd_soc_update_bits(codec, WCD937X_HPH_OCP_CTL, 0xFF, 0x3A);
+	snd_soc_update_bits(codec, WCD937X_RX_OCP_CTL, 0x0F, 0x02);
+	snd_soc_update_bits(codec, WCD937X_HPH_R_TEST, 0x01, 0x01);
+	snd_soc_update_bits(codec, WCD937X_HPH_L_TEST, 0x01, 0x01);
 
 	return 0;
 }