From 7f70656cc0961b7de57e82ed8e65422f8a75dd0d Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Fri, 7 Feb 2020 16:16:11 +0800 Subject: [PATCH] asoc: mbhc: update mode for analog type-c headset check POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER is not supported on new kernel-5.4. Update mode to TYPEC_ACCESSORY_AUDIO for analog type-c headset. Change-Id: Id46ea2eebea8257a48134431f07a81b6ed7e6c7d Signed-off-by: Meng Wang --- asoc/codecs/wcd-mbhc-v2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/asoc/codecs/wcd-mbhc-v2.c b/asoc/codecs/wcd-mbhc-v2.c index 860ac93259..3b2403fa06 100644 --- a/asoc/codecs/wcd-mbhc-v2.c +++ b/asoc/codecs/wcd-mbhc-v2.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -1633,7 +1634,7 @@ static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb, dev_dbg(mbhc->component->dev, "%s: mode = %lu\n", __func__, mode); - if (mode == POWER_SUPPLY_TYPEC_SINK_AUDIO_ADAPTER) { + if (mode == TYPEC_ACCESSORY_AUDIO) { if (mbhc->mbhc_cb->clk_setup) mbhc->mbhc_cb->clk_setup(mbhc->component, true); /* insertion detected, enable L_DET_EN */