Commit a315e76f authored by Jaska Uimonen's avatar Jaska Uimonen Committed by Mark Brown

ASoC: rt5682: add NULL handler to set_jack function

Implement NULL handler in set_jack function to disable
irq's.
Signed-off-by: default avatarJaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190927201408.925-4-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4413adc4
...@@ -995,6 +995,16 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component, ...@@ -995,6 +995,16 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
{ {
struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component); struct rt5682_priv *rt5682 = snd_soc_component_get_drvdata(component);
rt5682->hs_jack = hs_jack;
if (!hs_jack) {
regmap_update_bits(rt5682->regmap, RT5682_IRQ_CTRL_2,
RT5682_JD1_EN_MASK, RT5682_JD1_DIS);
regmap_update_bits(rt5682->regmap, RT5682_RC_CLK_CTRL,
RT5682_POW_JDH | RT5682_POW_JDL, 0);
return 0;
}
switch (rt5682->pdata.jd_src) { switch (rt5682->pdata.jd_src) {
case RT5682_JD1: case RT5682_JD1:
snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_2, snd_soc_component_update_bits(component, RT5682_CBJ_CTRL_2,
...@@ -1032,8 +1042,6 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component, ...@@ -1032,8 +1042,6 @@ static int rt5682_set_jack_detect(struct snd_soc_component *component,
break; break;
} }
rt5682->hs_jack = hs_jack;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment