From 342259045c98f15e5f2ebe10caef16c1a8599e5f Mon Sep 17 00:00:00 2001 From: Shunhua Lan Date: Wed, 20 Oct 2021 22:08:18 +0800 Subject: [PATCH] rk_headset: enable rk_headset and fix complie error Signed-off-by: Shunhua Lan Change-Id: I3f1906ddca16b2fedf403c7c88e00ff1dc4edd42 --- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/headset_observe/rk_headset_irq_hook_adc.c | 10 ---------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 6a7a4715ab05..5a4db3e06849 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -240,6 +240,8 @@ source "drivers/rkflash/Kconfig" source "drivers/rk_nand/Kconfig" +source "drivers/headset_observe/Kconfig" + source "drivers/rknpu/Kconfig" endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 080b0bc4d126..21cb5565c1d5 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -190,5 +190,6 @@ obj-$(CONFIG_INTERCONNECT) += interconnect/ obj-$(CONFIG_COUNTER) += counter/ obj-$(CONFIG_MOST) += most/ obj-$(CONFIG_RK_FLASH) += rkflash/ +obj-$(CONFIG_RK_HEADSET) += headset_observe/ obj-$(CONFIG_RK_NAND) += rk_nand/ obj-$(CONFIG_ROCKCHIP_RKNPU) += rknpu/ diff --git a/drivers/headset_observe/rk_headset_irq_hook_adc.c b/drivers/headset_observe/rk_headset_irq_hook_adc.c index ca3e0a6b7a94..d3756430a1aa 100644 --- a/drivers/headset_observe/rk_headset_irq_hook_adc.c +++ b/drivers/headset_observe/rk_headset_irq_hook_adc.c @@ -82,9 +82,6 @@ extern int rt5631_headset_mic_detect(bool headset_status); extern int rt3261_headset_mic_detect(int jack_insert); #endif -#if defined(CONFIG_SND_SOC_CX2072X) -extern int cx2072x_jack_report(void); -#endif /* headset private data */ struct headset_priv { @@ -299,13 +296,6 @@ static void hook_once_work(struct work_struct *work) } headset_info->cur_headset_status = headset_info->isMic ? BIT_HEADSET : BIT_HEADSET_NO_MIC; - -#if defined(CONFIG_SND_SOC_CX2072X) - if (cx2072x_jack_report() != -1) - headset_info->cur_headset_status = - (cx2072x_jack_report() == 3) ? BIT_HEADSET : - BIT_HEADSET_NO_MIC; -#endif if (headset_info->cur_headset_status) { if (headset_info->isMic) { extcon_set_state_sync(headset_info->edev,