mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoc: msm: Remove incorrect headset mic gpios
AV switch and US Euro headset switches are not supported on apq8064 target. Hence removing unnecessary gpio pins configuration. Change-Id: Ia4747b59b63b0bf7c37054fb1bcebfc54079b481 Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
This commit is contained in:
parent
163116921b
commit
5b4713798b
1 changed files with 0 additions and 60 deletions
|
@ -98,8 +98,6 @@ static int rec_mode = INCALL_REC_MONO;
|
|||
static struct clk *codec_clk;
|
||||
static int clk_users;
|
||||
|
||||
static int msm_headset_gpios_configured;
|
||||
|
||||
static struct snd_soc_jack hs_jack;
|
||||
static struct snd_soc_jack button_jack;
|
||||
|
||||
|
@ -1971,57 +1969,6 @@ struct snd_soc_card snd_soc_card_msm = {
|
|||
|
||||
static struct platform_device *msm_snd_device;
|
||||
|
||||
static int msm_configure_headset_mic_gpios(void)
|
||||
{
|
||||
int ret;
|
||||
struct pm_gpio param = {
|
||||
.direction = PM_GPIO_DIR_OUT,
|
||||
.output_buffer = PM_GPIO_OUT_BUF_CMOS,
|
||||
.output_value = 1,
|
||||
.pull = PM_GPIO_PULL_NO,
|
||||
.vin_sel = PM_GPIO_VIN_S4,
|
||||
.out_strength = PM_GPIO_STRENGTH_MED,
|
||||
.function = PM_GPIO_FUNC_NORMAL,
|
||||
};
|
||||
|
||||
ret = gpio_request(PM8921_GPIO_PM_TO_SYS(23), "AV_SWITCH");
|
||||
if (ret) {
|
||||
pr_err("%s: Failed to request gpio %d\n", __func__,
|
||||
PM8921_GPIO_PM_TO_SYS(23));
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(23), ¶m);
|
||||
if (ret)
|
||||
pr_err("%s: Failed to configure gpio %d\n", __func__,
|
||||
PM8921_GPIO_PM_TO_SYS(23));
|
||||
else
|
||||
gpio_direction_output(PM8921_GPIO_PM_TO_SYS(23), 0);
|
||||
|
||||
ret = gpio_request(PM8921_GPIO_PM_TO_SYS(35), "US_EURO_SWITCH");
|
||||
if (ret) {
|
||||
pr_err("%s: Failed to request gpio %d\n", __func__,
|
||||
PM8921_GPIO_PM_TO_SYS(35));
|
||||
gpio_free(PM8921_GPIO_PM_TO_SYS(23));
|
||||
return ret;
|
||||
}
|
||||
ret = pm8xxx_gpio_config(PM8921_GPIO_PM_TO_SYS(35), ¶m);
|
||||
if (ret)
|
||||
pr_err("%s: Failed to configure gpio %d\n", __func__,
|
||||
PM8921_GPIO_PM_TO_SYS(35));
|
||||
else
|
||||
gpio_direction_output(PM8921_GPIO_PM_TO_SYS(35), 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static void msm_free_headset_mic_gpios(void)
|
||||
{
|
||||
if (msm_headset_gpios_configured) {
|
||||
gpio_free(PM8921_GPIO_PM_TO_SYS(23));
|
||||
gpio_free(PM8921_GPIO_PM_TO_SYS(35));
|
||||
}
|
||||
}
|
||||
|
||||
static int __init msm_audio_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
@ -2052,12 +1999,6 @@ static int __init msm_audio_init(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
if (msm_configure_headset_mic_gpios()) {
|
||||
pr_err("%s Fail to configure headset mic gpios\n", __func__);
|
||||
msm_headset_gpios_configured = 0;
|
||||
} else
|
||||
msm_headset_gpios_configured = 1;
|
||||
|
||||
mutex_init(&cdc_mclk_mutex);
|
||||
return ret;
|
||||
|
||||
|
@ -2070,7 +2011,6 @@ static void __exit msm_audio_exit(void)
|
|||
pr_err("%s: Not the right machine type\n", __func__);
|
||||
return ;
|
||||
}
|
||||
msm_free_headset_mic_gpios();
|
||||
platform_device_unregister(msm_snd_device);
|
||||
if (mbhc_cfg.gpio)
|
||||
gpio_free(mbhc_cfg.gpio);
|
||||
|
|
Loading…
Reference in a new issue