diff options
author | Hsin-Yu Chao <hychao@chromium.org> | 2016-09-14 22:25:40 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-14 16:11:31 +0100 |
commit | 96fc294cf6cb27f01a865959b9637d0aea3b57c2 (patch) | |
tree | b08aedc10241056859e6d809eb6c1339eb3bbc9a /sound | |
parent | 29b4817d4018df78086157ea3a55c1d9424a7cfc (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')
-rw-r--r-- | sound/soc/codecs/da7219.c | 8 |
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, return ret; } + /* Software reset codec. */ + regmap_write_bits(da7219->regmap, DA7219_ACCDET_CONFIG_1, + DA7219_ACCDET_EN_MASK, 0); + regmap_write_bits(da7219->regmap, DA7219_CIF_CTRL, + DA7219_CIF_REG_SOFT_RESET_MASK, 0); + regmap_write_bits(da7219->regmap, DA7219_SYSTEM_ACTIVE, + DA7219_SYSTEM_ACTIVE_MASK, 0); + ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7219, &da7219_dai, 1); if (ret < 0) { |