|
@@ -1,4 +1,4 @@
|
|
-/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
|
|
|
|
|
|
+/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
|
|
*
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
@@ -1274,7 +1274,10 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
|
|
WCD_MBHC_RSC_LOCK(mbhc);
|
|
WCD_MBHC_RSC_LOCK(mbhc);
|
|
|
|
|
|
/* enable HS detection */
|
|
/* enable HS detection */
|
|
- if (mbhc->mbhc_cb->hph_pull_up_control)
|
|
|
|
|
|
+ if (mbhc->mbhc_cb->hph_pull_up_control_v2)
|
|
|
|
+ mbhc->mbhc_cb->hph_pull_up_control_v2(codec,
|
|
|
|
+ HS_PULLUP_I_DEFAULT);
|
|
|
|
+ else if (mbhc->mbhc_cb->hph_pull_up_control)
|
|
mbhc->mbhc_cb->hph_pull_up_control(codec, I_DEFAULT);
|
|
mbhc->mbhc_cb->hph_pull_up_control(codec, I_DEFAULT);
|
|
else
|
|
else
|
|
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HS_L_DET_PULL_UP_CTRL, 3);
|
|
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HS_L_DET_PULL_UP_CTRL, 3);
|
|
@@ -1291,7 +1294,10 @@ static int wcd_mbhc_initialise(struct wcd_mbhc *mbhc)
|
|
mbhc->hphl_swh = 1;
|
|
mbhc->hphl_swh = 1;
|
|
mbhc->gnd_swh = 1;
|
|
mbhc->gnd_swh = 1;
|
|
|
|
|
|
- if (mbhc->mbhc_cb->hph_pull_up_control)
|
|
|
|
|
|
+ if (mbhc->mbhc_cb->hph_pull_up_control_v2)
|
|
|
|
+ mbhc->mbhc_cb->hph_pull_up_control_v2(codec,
|
|
|
|
+ HS_PULLUP_I_OFF);
|
|
|
|
+ else if (mbhc->mbhc_cb->hph_pull_up_control)
|
|
mbhc->mbhc_cb->hph_pull_up_control(codec, I_OFF);
|
|
mbhc->mbhc_cb->hph_pull_up_control(codec, I_OFF);
|
|
else
|
|
else
|
|
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HS_L_DET_PULL_UP_CTRL,
|
|
WCD_MBHC_REG_UPDATE_BITS(WCD_MBHC_HS_L_DET_PULL_UP_CTRL,
|