aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorHsin-Yu Chao <hychao@chromium.org>2016-09-14 10:25:40 -0400
committerMark Brown <broonie@kernel.org>2016-09-14 11:11:31 -0400
commit96fc294cf6cb27f01a865959b9637d0aea3b57c2 (patch)
treeb08aedc10241056859e6d809eb6c1339eb3bbc9a /sound/soc
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
ASoC: da7219: software reset codec at probe
Da7219 does not trigger interrupt to report jack status when system boots from warm reset because its power remains on during warm reset. Doing software reset at probe to handle this. Signed-off-by: Hsin-Yu Chao <hychao@chromium.org> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/da7219.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index 50ea94317cb3..30f35e88bec2 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1937,6 +1937,14 @@ static int da7219_i2c_probe(struct i2c_client *i2c,
1937 return ret; 1937 return ret;
1938 } 1938 }
1939 1939
1940 /* Software reset codec. */
1941 regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1,
1942 DA7219_ACCDET_EN_MASK, 0);
1943 regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL,
1944 DA7219_CIF_REG_SOFT_RESET_MASK, 0);
1945 regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE,
1946 DA7219_SYSTEM_ACTIVE_MASK, 0);
1947
1940 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219, 1948 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219,
1941 &da7219_dai, 1); 1949 &da7219_dai, 1);
1942 if (ret < 0) { 1950 if (ret < 0) {