Skip to content

Commit eb775d3

Browse files
Peter Ujfalusibroonie
authored andcommitted
ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO
Remove the use of set_hs_extmute callback and let the codec driver to handle the extmute GPIO. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1 parent 281ecd1 commit eb775d3

3 files changed

Lines changed: 2 additions & 13 deletions

File tree

‎arch/arm/mach-omap2/board-zoom-peripherals.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "common-board-devices.h"
3535

3636
#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
37+
#define ZOOM2_HEADSET_EXTMUTE_GPIO (153)
3738
#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
3839

3940
#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
@@ -244,12 +245,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
244245
return ret;
245246
}
246247

247-
/* EXTMUTE callback function */
248-
static void zoom2_set_hs_extmute(int mute)
249-
{
250-
gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
251-
}
252-
253248
static struct twl4030_gpio_platform_data zoom_gpio_data = {
254249
.gpio_base = OMAP_MAX_GPIO_LINES,
255250
.irq_base = TWL4030_GPIO_IRQ_BASE,
@@ -279,7 +274,7 @@ static int __init omap_i2c_init(void)
279274

280275
codec_data->ramp_delay_value = 3; /* 161 ms */
281276
codec_data->hs_extmute = 1;
282-
codec_data->set_hs_extmute = zoom2_set_hs_extmute;
277+
codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO;
283278
}
284279
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
285280
omap_register_i2c_bus(2, 400, NULL, 0);

‎arch/arm/mach-omap2/include/mach/board-zoom.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@
88
extern int __init zoom_debugboard_init(void);
99
extern void __init zoom_peripherals_init(void);
1010
extern void __init zoom_display_init(void);
11-
12-
#define ZOOM2_HEADSET_EXTMUTE_GPIO 153

‎sound/soc/omap/zoom2.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ static int __init zoom2_soc_init(void)
191191
BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
192192
gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);
193193

194-
BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0);
195-
gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0);
196-
197194
return 0;
198195

199196
err1:
@@ -207,7 +204,6 @@ module_init(zoom2_soc_init);
207204
static void __exit zoom2_soc_exit(void)
208205
{
209206
gpio_free(ZOOM2_HEADSET_MUX_GPIO);
210-
gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO);
211207

212208
platform_device_unregister(zoom2_snd_device);
213209
}

0 commit comments

Comments
 (0)