asoc: mbhc: disable unnecessary irq for pitti

Disable unnecessary irq for pitti.

Change-Id: I17d5c35eb0aae2d3ff754fd04deaec346846e489
Signed-off-by: Yuhui Zhao <quic_yuhuzhao@quicinc.com>
这个提交包含在:
Yuhui Zhao
2024-04-08 19:04:01 +08:00
父节点 055c2ae6fd
当前提交 d5420cefee
修改 2 个文件,包含 23 行新增0 行删除

查看文件

@@ -1042,6 +1042,8 @@ int wcd9378_mbhc_post_ssr_init(struct wcd9378_mbhc *mbhc,
{ {
int ret = 0; int ret = 0;
struct wcd_mbhc *wcd_mbhc = NULL; struct wcd_mbhc *wcd_mbhc = NULL;
struct wcd9378_priv *wcd9378 =
dev_get_drvdata(component->dev);
if (!mbhc || !component) if (!mbhc || !component)
return -EINVAL; return -EINVAL;
@@ -1063,6 +1065,15 @@ int wcd9378_mbhc_post_ssr_init(struct wcd9378_mbhc *mbhc,
goto done; goto done;
} }
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_MBHC_ELECT_INS_REM_DET);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_MBHC_ELECT_INS_REM_LEG_DET);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_EAR_SCD_INT);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_AUX_SCD_INT);
done: done:
return ret; return ret;
} }
@@ -1083,6 +1094,8 @@ int wcd9378_mbhc_init(struct wcd9378_mbhc **mbhc,
struct wcd_mbhc *wcd_mbhc = NULL; struct wcd_mbhc *wcd_mbhc = NULL;
int ret = 0; int ret = 0;
struct wcd9378_pdata *pdata; struct wcd9378_pdata *pdata;
struct wcd9378_priv *wcd9378 =
dev_get_drvdata(component->dev);
if (!component) { if (!component) {
pr_err("%s: component is NULL\n", __func__); pr_err("%s: component is NULL\n", __func__);
@@ -1123,6 +1136,15 @@ int wcd9378_mbhc_init(struct wcd9378_mbhc **mbhc,
goto err; goto err;
} }
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_MBHC_ELECT_INS_REM_DET);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_MBHC_ELECT_INS_REM_LEG_DET);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_EAR_SCD_INT);
wcd_disable_irq(&wcd9378->irq_info,
WCD9378_IRQ_AUX_SCD_INT);
(*mbhc) = wcd9378_mbhc; (*mbhc) = wcd9378_mbhc;
snd_soc_add_component_controls(component, impedance_detect_controls, snd_soc_add_component_controls(component, impedance_detect_controls,
ARRAY_SIZE(impedance_detect_controls)); ARRAY_SIZE(impedance_detect_controls));

查看文件

@@ -226,6 +226,7 @@ static const struct regmap_irq wcd9378_regmap_irqs[WCD9378_NUM_IRQS] = {
REGMAP_IRQ_REG(WCD9378_IRQ_MBHC_MOISTURE_INT, 2, 0x02), REGMAP_IRQ_REG(WCD9378_IRQ_MBHC_MOISTURE_INT, 2, 0x02),
REGMAP_IRQ_REG(WCD9378_IRQ_HPHL_SURGE_DET_INT, 2, 0x04), REGMAP_IRQ_REG(WCD9378_IRQ_HPHL_SURGE_DET_INT, 2, 0x04),
REGMAP_IRQ_REG(WCD9378_IRQ_HPHR_SURGE_DET_INT, 2, 0x08), REGMAP_IRQ_REG(WCD9378_IRQ_HPHR_SURGE_DET_INT, 2, 0x08),
REGMAP_IRQ_REG(WCD9378_IRQ_SAPU_PROT_MODE_CHG, 2, 0x40),
}; };
static int wcd9378_handle_post_irq(void *data) static int wcd9378_handle_post_irq(void *data)