ASoC: Convert e740_wm9705 to use gpio_request_one()
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
b71951d63d
commit
aec60f51e5
1 changed files with 6 additions and 14 deletions
|
@ -146,29 +146,21 @@ static int __init e740_init(void)
|
||||||
if (!machine_is_e740())
|
if (!machine_is_e740())
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
ret = gpio_request(GPIO_E740_MIC_ON, "Mic amp");
|
/* Disable audio */
|
||||||
|
ret = gpio_request_one(GPIO_E740_MIC_ON, GPIOF_OUT_INIT_LOW, "Mic amp");
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ret = gpio_request(GPIO_E740_AMP_ON, "Output amp");
|
ret = gpio_request_one(GPIO_E740_AMP_ON, GPIOF_OUT_INIT_LOW,
|
||||||
|
"Output amp");
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_mic_amp_gpio;
|
goto free_mic_amp_gpio;
|
||||||
|
|
||||||
ret = gpio_request(GPIO_E740_WM9705_nAVDD2, "Audio power");
|
ret = gpio_request_one(GPIO_E740_WM9705_nAVDD2, GPIOF_OUT_INIT_HIGH,
|
||||||
|
"Audio power");
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_op_amp_gpio;
|
goto free_op_amp_gpio;
|
||||||
|
|
||||||
/* Disable audio */
|
|
||||||
ret = gpio_direction_output(GPIO_E740_MIC_ON, 0);
|
|
||||||
if (ret)
|
|
||||||
goto free_apwr_gpio;
|
|
||||||
ret = gpio_direction_output(GPIO_E740_AMP_ON, 0);
|
|
||||||
if (ret)
|
|
||||||
goto free_apwr_gpio;
|
|
||||||
ret = gpio_direction_output(GPIO_E740_WM9705_nAVDD2, 1);
|
|
||||||
if (ret)
|
|
||||||
goto free_apwr_gpio;
|
|
||||||
|
|
||||||
e740_snd_device = platform_device_alloc("soc-audio", -1);
|
e740_snd_device = platform_device_alloc("soc-audio", -1);
|
||||||
if (!e740_snd_device) {
|
if (!e740_snd_device) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
|
Reference in a new issue