summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.c
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2017-06-28 14:49:38 +0200
committerMark Brown <broonie@kernel.org>2017-06-28 18:33:31 +0100
commitaea086dda2d5df659a7c5d9efe85721e9442a133 (patch)
treea45ea8e29fa9e9c20ebf30543391ee65a18c0d09 /sound/soc/codecs/rt5645.c
parent895750228c9d3361ed82e9786322604de3232466 (diff)
downloadlinux-aea086dda2d5df659a7c5d9efe85721e9442a133.tar.bz2
ASoC: rt5645: add inv_jd1_1 flag
The flag will invert jd1_1 status. Which will be used if the jack connector is normal closed. Signed-off-by: Bard Liao <bardliao@realtek.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5645.c')
-rw-r--r--sound/soc/codecs/rt5645.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index e0c09bbd3f12..162044d82632 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3833,6 +3833,10 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
default:
break;
}
+ if (rt5645->pdata.inv_jd1_1) {
+ regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
+ RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
+ }
}
regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,