提交 e1d8a5f5 编写于 作者: C Christophe JAILLET 提交者: Zheng Zengkai

ASoC: wcd9335: Disable irq on slave ports in the remove function

stable inclusion
from stable-5.10.65
commit 5c305b90d8a1c825455cb41f0d59a73ff17f638b
bugzilla: 182361 https://gitee.com/openeuler/kernel/issues/I4EH3U

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5c305b90d8a1c825455cb41f0d59a73ff17f638b

--------------------------------

[ Upstream commit d3efd26a ]

The probe calls 'wcd9335_setup_irqs()' to enable interrupts on all slave
ports.
This must be undone in the remove function.

Add a 'wcd9335_teardown_irqs()' function that undoes 'wcd9335_setup_irqs()'
function, and call it from the remove function.

Fixes: 20aedafd ("ASoC: wcd9335: add support to wcd9335 codec")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Message-Id: <8f761244d79bd4c098af8a482be9121d3a486d1b.1629091028.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 235c3b28
...@@ -4076,6 +4076,16 @@ static int wcd9335_setup_irqs(struct wcd9335_codec *wcd) ...@@ -4076,6 +4076,16 @@ static int wcd9335_setup_irqs(struct wcd9335_codec *wcd)
return ret; return ret;
} }
static void wcd9335_teardown_irqs(struct wcd9335_codec *wcd)
{
int i;
/* disable interrupts on all slave ports */
for (i = 0; i < WCD9335_SLIM_NUM_PORT_REG; i++)
regmap_write(wcd->if_regmap, WCD9335_SLIM_PGD_PORT_INT_EN0 + i,
0x00);
}
static void wcd9335_cdc_sido_ccl_enable(struct wcd9335_codec *wcd, static void wcd9335_cdc_sido_ccl_enable(struct wcd9335_codec *wcd,
bool ccl_flag) bool ccl_flag)
{ {
...@@ -4878,6 +4888,7 @@ static void wcd9335_codec_remove(struct snd_soc_component *comp) ...@@ -4878,6 +4888,7 @@ static void wcd9335_codec_remove(struct snd_soc_component *comp)
struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev); struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev);
wcd_clsh_ctrl_free(wcd->clsh_ctrl); wcd_clsh_ctrl_free(wcd->clsh_ctrl);
wcd9335_teardown_irqs(wcd);
} }
static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp, static int wcd9335_codec_set_sysclk(struct snd_soc_component *comp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册