Merge "ASoC: wcd-mbhc: correct special headset detection logic"
Цей коміт міститься в:

зафіксовано
Gerrit - the friendly Code Review server

коміт
b418f419b0
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -1102,6 +1102,7 @@ int tavil_mbhc_init(struct wcd934x_mbhc **mbhc,
|
||||
struct wcd934x_mbhc *wcd934x_mbhc;
|
||||
struct wcd_mbhc *wcd_mbhc;
|
||||
int ret;
|
||||
struct wcd9xxx_pdata *pdata;
|
||||
|
||||
wcd934x_mbhc = devm_kzalloc(component->dev, sizeof(struct wcd934x_mbhc),
|
||||
GFP_KERNEL);
|
||||
@@ -1122,6 +1123,14 @@ int tavil_mbhc_init(struct wcd934x_mbhc **mbhc,
|
||||
/* Setting default mbhc detection logic to ADC for Tavil */
|
||||
wcd_mbhc->mbhc_detection_logic = WCD_DETECTION_ADC;
|
||||
|
||||
pdata = dev_get_platdata(component->dev->parent);
|
||||
if (!pdata) {
|
||||
dev_err(component->dev, "%s: pdata pointer is NULL\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
wcd_mbhc->micb_mv = pdata->micbias.micb2_mv;
|
||||
|
||||
ret = wcd_mbhc_init(wcd_mbhc, component, &mbhc_cb,
|
||||
&intr_ids, wcd_mbhc_registers,
|
||||
TAVIL_ZDET_SUPPORTED);
|
||||
|
Посилання в новій задачі
Заблокувати користувача