Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb775d38 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 281ecd16
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@
#include "common-board-devices.h"
#include "common-board-devices.h"


#define OMAP_ZOOM_WLAN_PMENA_GPIO	(101)
#define OMAP_ZOOM_WLAN_PMENA_GPIO	(101)
#define ZOOM2_HEADSET_EXTMUTE_GPIO	(153)
#define OMAP_ZOOM_WLAN_IRQ_GPIO		(162)
#define OMAP_ZOOM_WLAN_IRQ_GPIO		(162)


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


/* EXTMUTE callback function */
static void zoom2_set_hs_extmute(int mute)
{
	gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
}

static struct twl4030_gpio_platform_data zoom_gpio_data = {
static struct twl4030_gpio_platform_data zoom_gpio_data = {
	.gpio_base	= OMAP_MAX_GPIO_LINES,
	.gpio_base	= OMAP_MAX_GPIO_LINES,
	.irq_base	= TWL4030_GPIO_IRQ_BASE,
	.irq_base	= TWL4030_GPIO_IRQ_BASE,
@@ -279,7 +274,7 @@ static int __init omap_i2c_init(void)


		codec_data->ramp_delay_value = 3;	/* 161 ms */
		codec_data->ramp_delay_value = 3;	/* 161 ms */
		codec_data->hs_extmute = 1;
		codec_data->hs_extmute = 1;
		codec_data->set_hs_extmute = zoom2_set_hs_extmute;
		codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO;
	}
	}
	omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
	omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
	omap_register_i2c_bus(2, 400, NULL, 0);
	omap_register_i2c_bus(2, 400, NULL, 0);
+0 −2
Original line number Original line Diff line number Diff line
@@ -8,5 +8,3 @@
extern int __init zoom_debugboard_init(void);
extern int __init zoom_debugboard_init(void);
extern void __init zoom_peripherals_init(void);
extern void __init zoom_peripherals_init(void);
extern void __init zoom_display_init(void);
extern void __init zoom_display_init(void);

#define ZOOM2_HEADSET_EXTMUTE_GPIO	153
+0 −4
Original line number Original line Diff line number Diff line
@@ -191,9 +191,6 @@ static int __init zoom2_soc_init(void)
	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);
	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);


	BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0);
	gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0);

	return 0;
	return 0;


err1:
err1:
@@ -207,7 +204,6 @@ module_init(zoom2_soc_init);
static void __exit zoom2_soc_exit(void)
static void __exit zoom2_soc_exit(void)
{
{
	gpio_free(ZOOM2_HEADSET_MUX_GPIO);
	gpio_free(ZOOM2_HEADSET_MUX_GPIO);
	gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO);


	platform_device_unregister(zoom2_snd_device);
	platform_device_unregister(zoom2_snd_device);
}
}