mbhc:disable moisture detect for rhode

update mbhc for rhode;
disable moisture detect.

Change-Id: I9f563b4007c9e9fc9064856bcf27e9c97c174be9
Signed-off-by: yaozm1 <yaozm1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2108749
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
yaozm1 authored and Gilberto Gambugge committed 2023-06-01 00:35:13 -03:00
1 parent ebb8a240e5
commit 50680956a7
4 files changed
+13 -1

No files matched your search

+3 -1
View File
@@ -943,8 +943,10 @@ static void wcd_mbhc_swch_irq_handler(struct wcd_mbhc *mbhc)
/* If moisture is present, then enable polling, disable /* If moisture is present, then enable polling, disable
* moisture detection and wait for interrupt * moisture detection and wait for interrupt
*/ */
if (wcd_mbhc_moisture_detect(mbhc, detection_type)) if (wcd_mbhc_moisture_detect(mbhc, detection_type)){
pr_info("%s: hwcd_mbhc_moisture_detect\n", __func__);
goto done; goto done;
}
/* Make sure MASTER_BIAS_CTL is enabled */ /* Make sure MASTER_BIAS_CTL is enabled */
mbhc->mbhc_cb->mbhc_bias(component, true); mbhc->mbhc_cb->mbhc_bias(component, true);
+3
View File
@@ -36,6 +36,9 @@ ifeq ($(KERNEL_BUILD), 0)
export export
INCS += -include $(AUDIO_ROOT)/config/litoautoconf.h INCS += -include $(AUDIO_ROOT)/config/litoautoconf.h
endif endif
ifneq (,$(filter rhode%, $(TARGET_PRODUCT)))
INCS += -include $(AUDIO_ROOT)/config/rhodeautoconf.h
endif
endif endif
# As per target team, build is done as follows: # As per target team, build is done as follows:
+6
View File
@@ -767,6 +767,12 @@ static bool wcd937x_mbhc_get_moisture_status(struct wcd_mbhc *mbhc)
struct snd_soc_component *component = mbhc->component; struct snd_soc_component *component = mbhc->component;
bool ret = false; bool ret = false;
#ifdef CONFIG_MBHC_DISABLE_MOISTURE_DETECT
pr_info("%s: disable moisture detection \n", __func__);
snd_soc_component_update_bits(component, WCD937X_MBHC_NEW_CTL_2, 0x0C, R_OFF << 2);
goto done;
#endif
if ((mbhc->moist_rref == R_OFF) || if ((mbhc->moist_rref == R_OFF) ||
(mbhc->mbhc_cfg->enable_usbc_analog)) { (mbhc->mbhc_cfg->enable_usbc_analog)) {
snd_soc_component_update_bits(component, WCD937X_MBHC_NEW_CTL_2, snd_soc_component_update_bits(component, WCD937X_MBHC_NEW_CTL_2,
+1
View File
@@ -2,3 +2,4 @@
/* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. /* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
*/ */
#define CONFIG_AW882XX_STEREO_SMARTPA 1 #define CONFIG_AW882XX_STEREO_SMARTPA 1
#define CONFIG_MBHC_DISABLE_MOISTURE_DETECT 1