From 2937a09ddce578cf9dd63f6987e5a23cb3d0f8a3 Mon Sep 17 00:00:00 2001 From: Prasad Kumpatla Date: Wed, 14 Dec 2022 16:08:05 +0530 Subject: [PATCH] asoc: wcd-mbhc: Ignore mech plug irq for AATC HS WCD USB AATC does not require mech plug irq, UCSI layer will help to get the events to process insert/remove of AATC HS. Change-Id: Ie1b14703605be294471303b6454f94b55e9f932d Signed-off-by: Prasad Kumpatla --- asoc/codecs/wcd-mbhc-v2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/asoc/codecs/wcd-mbhc-v2.c b/asoc/codecs/wcd-mbhc-v2.c index d9af795745..ea57c83d89 100644 --- a/asoc/codecs/wcd-mbhc-v2.c +++ b/asoc/codecs/wcd-mbhc-v2.c @@ -1141,6 +1141,17 @@ static irqreturn_t wcd_mbhc_mech_plug_detect_irq(int irq, void *data) struct wcd_mbhc *mbhc = data; pr_debug("%s: enter\n", __func__); + + /* WCD USB AATC did not required mech plug detection, will receive + * insertion/removal events from UCSI layer + */ +#if IS_ENABLED(CONFIG_QCOM_WCD_USBSS_I2C) + if (mbhc->mbhc_cfg->enable_usbc_analog) { + pr_debug("%s: leave, (irq_none)", __func__); + return IRQ_NONE; + } +#endif + if (mbhc == NULL) { pr_err("%s: NULL irq data\n", __func__); return IRQ_NONE;