From patchwork Wed Aug 8 09:41:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1293911 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 93F59DF223 for ; Wed, 8 Aug 2012 09:43:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030280Ab2HHJnz (ORCPT ); Wed, 8 Aug 2012 05:43:55 -0400 Received: from na3sys009aog109.obsmtp.com ([74.125.149.201]:39641 "EHLO na3sys009aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964870Ab2HHJmD (ORCPT ); Wed, 8 Aug 2012 05:42:03 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]) (using TLSv1) by na3sys009aob109.postini.com ([74.125.148.12]) with SMTP ID DSNKUCI0anJ3f4d5Ztu/fEC1BqAljnec3rwx@postini.com; Wed, 08 Aug 2012 02:42:03 PDT Received: by obbuo13 with SMTP id uo13so884671obb.19 for ; Wed, 08 Aug 2012 02:42:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=CPwUUsBC1nDNWZ/aS0mCSetxMa4kTTRn0YvKZmfhIdw=; b=j3EfVxQelHxSvxSbxJcQJ4LVrKNsvL09erpNroTe2flvyPsy2iSATv913HAKSJCliS N1Q2mcxRn1MA1RPLbVZPe9v67mqyeYSTnLFMDGaarLyhL8vs49mYHKEywYCU26qAi5nV WD7P5cxA33RaXy0cxU3SgMHrdSYOLt2UJpg5Ov5SH0wiF7sdOxggJxOFJrNc+8njE5mm fsRBlHjHwoo0ZzJ4Sh35XLKx3hqtZXP3mLbd8Xu1S6nfFWf6GhNnmXT9YYAeVYQU4fZF Ai/sQVstjGN4n1qNMy0wkomkmblaEe4ynQhUB6/9HI6npbCKEy+skUMOAY92hJkZxlj8 j8eg== Received: by 10.182.131.73 with SMTP id ok9mr29096464obb.19.1344418922093; Wed, 08 Aug 2012 02:42:02 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id c6sm22141308obn.13.2012.08.08.02.41.59 (version=SSLv3 cipher=OTHER); Wed, 08 Aug 2012 02:42:01 -0700 (PDT) From: Peter Ujfalusi To: Samuel Ortiz , Mark Brown , Liam Girdwood , Tony Lindgren , Dmitry Torokhov Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, Benoit Cousson Subject: [PATCH 07/11] ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO Date: Wed, 8 Aug 2012 12:41:23 +0300 Message-Id: <1344418887-5262-8-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1344418887-5262-1-git-send-email-peter.ujfalusi@ti.com> References: <1344418887-5262-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQlj+KU8k/aTb/Bu6hwZDqjJChnI/VIVZLTpErW+LXQgcKc2beYIc48be4ycxrjQvipkwejK Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Remove the use of set_hs_extmute callback and let the codec driver to handle the extmute GPIO. Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren --- arch/arm/mach-omap2/board-zoom-peripherals.c | 9 ++------- arch/arm/mach-omap2/include/mach/board-zoom.h | 2 -- 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 b797cb2..a7d3b04 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -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); diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h index 775fdc3..2e94869 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 @@ 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 diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 920e0d9..df97a41 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c @@ -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); }