diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2012-09-10 06:46:28 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-09-22 11:18:25 -0400 |
commit | eb775d38e0ff4a83d7fd020a7b147bb61b1e4006 (patch) | |
tree | 40c57bed99163c01d96da7cffd740ee714bc8a23 | |
parent | 281ecd1611654cdcdec0ffcb55e8f285b8199727 (diff) |
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>
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/include/mach/board-zoom.h | 2 | ||||
-rw-r--r-- | sound/soc/omap/zoom2.c | 4 |
3 files changed, 2 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index b797cb279618..a7d3b0480744 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include "common-board-devices.h" | 34 | #include "common-board-devices.h" |
35 | 35 | ||
36 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) | 36 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) |
37 | #define ZOOM2_HEADSET_EXTMUTE_GPIO (153) | ||
37 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) | 38 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) |
38 | 39 | ||
39 | #define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) | 40 | #define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) |
@@ -244,12 +245,6 @@ static int zoom_twl_gpio_setup(struct device *dev, | |||
244 | return ret; | 245 | return ret; |
245 | } | 246 | } |
246 | 247 | ||
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 | |||
253 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | 248 | static struct twl4030_gpio_platform_data zoom_gpio_data = { |
254 | .gpio_base = OMAP_MAX_GPIO_LINES, | 249 | .gpio_base = OMAP_MAX_GPIO_LINES, |
255 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 250 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -279,7 +274,7 @@ static int __init omap_i2c_init(void) | |||
279 | 274 | ||
280 | codec_data->ramp_delay_value = 3; /* 161 ms */ | 275 | codec_data->ramp_delay_value = 3; /* 161 ms */ |
281 | codec_data->hs_extmute = 1; | 276 | 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; |
283 | } | 278 | } |
284 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); | 279 | omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); |
285 | omap_register_i2c_bus(2, 400, NULL, 0); | 280 | omap_register_i2c_bus(2, 400, NULL, 0); |
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h index 775fdc3b000b..2e9486940ead 100644 --- a/arch/arm/mach-omap2/include/mach/board-zoom.h +++ b/arch/arm/mach-omap2/include/mach/board-zoom.h | |||
@@ -8,5 +8,3 @@ | |||
8 | extern int __init zoom_debugboard_init(void); | 8 | extern int __init zoom_debugboard_init(void); |
9 | extern void __init zoom_peripherals_init(void); | 9 | extern void __init zoom_peripherals_init(void); |
10 | extern void __init zoom_display_init(void); | 10 | extern void __init zoom_display_init(void); |
11 | |||
12 | #define ZOOM2_HEADSET_EXTMUTE_GPIO 153 | ||
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 920e0d9e03db..df97a4196cd3 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -191,9 +191,6 @@ static int __init zoom2_soc_init(void) | |||
191 | BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0); | 191 | BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0); |
192 | gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0); | 192 | gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0); |
193 | 193 | ||
194 | BUG_ON(gpio_request(ZOOM2_HEADSET_EXTMUTE_GPIO, "ext_mute") < 0); | ||
195 | gpio_direction_output(ZOOM2_HEADSET_EXTMUTE_GPIO, 0); | ||
196 | |||
197 | return 0; | 194 | return 0; |
198 | 195 | ||
199 | err1: | 196 | err1: |
@@ -207,7 +204,6 @@ module_init(zoom2_soc_init); | |||
207 | static void __exit zoom2_soc_exit(void) | 204 | static void __exit zoom2_soc_exit(void) |
208 | { | 205 | { |
209 | gpio_free(ZOOM2_HEADSET_MUX_GPIO); | 206 | gpio_free(ZOOM2_HEADSET_MUX_GPIO); |
210 | gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO); | ||
211 | 207 | ||
212 | platform_device_unregister(zoom2_snd_device); | 208 | platform_device_unregister(zoom2_snd_device); |
213 | } | 209 | } |