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: 1293921 Return-Path: X-Original-To: patchwork-linux-omap@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 C5A9CDF223 for ; Wed, 8 Aug 2012 09:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030215Ab2HHJny (ORCPT ); Wed, 8 Aug 2012 05:43:54 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:33816 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964920Ab2HHJmE (ORCPT ); Wed, 8 Aug 2012 05:42:04 -0400 Received: from mail-ob0-f179.google.com ([209.85.214.179]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKUCI0anJ3f4d5Ztu/fEC1BqAljnec3rwx@postini.com; Wed, 08 Aug 2012 02:42:03 PDT Received: by obbeh20 with SMTP id eh20so795208obb.10 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=UOaYPB9+JPtdyNxa8ujNzgI9DKXscbVpFqcYrP3J9TtrPLY/LP5MGeN+wmOQ+RmhYO 049N8Ey2aQTvbXlUhLvEhYKXN4yTZtK3zTR6uR0VRTqXi6lp2mEezO0oeJe/TDOfMc22 fYwN3B5zrQMaps4z28F/SvUYETdvkKDlH3Y6LU2vJznq9VAnj5+EHKkSJrVq5JPxIFLY 5oa2FnIwJn1MUnHaVDrBBxDtyapsgTGxQHhH5poAan54JDEu9qKrV05F/ak3IDmmX2Z0 /red3kAGf8GSoSgdS8l+/jYauttxRSX0j3EhRE7xyiwYcYEeoO6XP8G+AhtZDfPaqw9G wbRQ== 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: ALoCoQkuDRstCY6byP843Q+95cZKEXlcn28rgLdE+fDXr75csS2UVZG9GAl8qtjewLoz/Ei7Kt70 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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); }