]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 10 Sep 2012 10:46:28 +0000 (13:46 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 22 Sep 2012 15:18:25 +0000 (11:18 -0400)
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>
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/include/mach/board-zoom.h
sound/soc/omap/zoom2.c

index b797cb279618c59428e0a443c5c962c1655fbc5c..a7d3b04807448c3bfa29cc408a09af1ea964488a 100644 (file)
@@ -34,6 +34,7 @@
 #include "common-board-devices.h"
 
 #define OMAP_ZOOM_WLAN_PMENA_GPIO      (101)
+#define ZOOM2_HEADSET_EXTMUTE_GPIO     (153)
 #define OMAP_ZOOM_WLAN_IRQ_GPIO                (162)
 
 #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;
 }
 
-/* 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 = {
        .gpio_base      = OMAP_MAX_GPIO_LINES,
        .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->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_register_i2c_bus(2, 400, NULL, 0);
index 775fdc3b000b686d20e09ab21d4a5c756c8c9542..2e9486940ead2c993b5b50c36d9cc18d661951d7 100644 (file)
@@ -8,5 +8,3 @@
 extern int __init zoom_debugboard_init(void);
 extern void __init zoom_peripherals_init(void);
 extern void __init zoom_display_init(void);
-
-#define ZOOM2_HEADSET_EXTMUTE_GPIO     153
index 920e0d9e03db1531ff994156c2a02a3120af447f..df97a4196cd3e169c676c85bb9cfc5058cef06df 100644 (file)
@@ -191,9 +191,6 @@ static int __init zoom2_soc_init(void)
        BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 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;
 
 err1:
@@ -207,7 +204,6 @@ module_init(zoom2_soc_init);
 static void __exit zoom2_soc_exit(void)
 {
        gpio_free(ZOOM2_HEADSET_MUX_GPIO);
-       gpio_free(ZOOM2_HEADSET_EXTMUTE_GPIO);
 
        platform_device_unregister(zoom2_snd_device);
 }