From afcd8c51785df3de1fc173b0221e35e06f69189c Mon Sep 17 00:00:00 2001 From: Prasad Kumpatla Date: Tue, 6 Dec 2022 17:37:17 +0530 Subject: [PATCH] asoc: wcd-mbhc: Disable moisture detect and duty cycle Disable moisture detect and duty cycle for WCD USB AATC HS. Change-Id: I7bb0d5f2aaa52368f2a00bc99b066eb459c72094 Signed-off-by: Prasad Kumpatla --- asoc/codecs/wcd-mbhc-v2.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/asoc/codecs/wcd-mbhc-v2.c b/asoc/codecs/wcd-mbhc-v2.c index ea57c83d89..a44bbe99b9 100644 --- a/asoc/codecs/wcd-mbhc-v2.c +++ b/asoc/codecs/wcd-mbhc-v2.c @@ -1786,6 +1786,14 @@ int wcd_mbhc_start(struct wcd_mbhc *mbhc, struct wcd_mbhc_config *mbhc_cfg) } } + /* Disable moisture detect and duty cycle for WCD USB AATC HS*/ + if (mbhc_cfg->enable_usbc_analog) { + mbhc_cfg->moisture_en = false; + mbhc_cfg->moisture_duty_cycle_en = false; + pr_debug("%s: Disable moisture detect and duty cycle of AATC", + __func__); + } + /* Set btn key code */ if ((!mbhc->is_btn_already_regd) && wcd_mbhc_set_keycode(mbhc)) pr_err("Set btn key code error!!!\n");