From patchwork Tue Aug 14 14:22:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1320251 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id F41F040210 for ; Tue, 14 Aug 2012 14:26:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756327Ab2HNOXT (ORCPT ); Tue, 14 Aug 2012 10:23:19 -0400 Received: from na3sys009aog131.obsmtp.com ([74.125.149.247]:33127 "EHLO na3sys009aog131.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756293Ab2HNOXJ (ORCPT ); Tue, 14 Aug 2012 10:23:09 -0400 Received: from mail-qa0-f54.google.com ([209.85.216.54]) (using TLSv1) by na3sys009aob131.postini.com ([74.125.148.12]) with SMTP ID DSNKUCpfTF0ff/OG0b1N48HWxiwa9UH1C9IS@postini.com; Tue, 14 Aug 2012 07:23:09 PDT Received: by qatn12 with SMTP id n12so326439qat.20 for ; Tue, 14 Aug 2012 07:23:07 -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=lyJQ2VnF28R5sBB+4SXkDJPdwGmBNUNjTywJKXmf1w3OxnmoId+DC88hadD0E7g528 15RKwXLez0RjY/Bv+D2sMdyjl9GbOwVCGWY99szDmDoGmV5RwuG2jY8UEPDSXovfDNsP iURy1aj6HOYMDMMIuItTAuYEo9VFKkyYNUo0B50zkzTYlypjxENOhIeAu11ADgHDki9W JVtqba3oayVSKsYl+WlAzp0dFndS15NkFisLnwaW0zMJajMt5l1tE88QmiGicOmgEwWZ 6O2ZptNclC//FDwfQtX2ktpk/di+/Mwd0o1kvplySLcxLq1D+fzSOWy/fxhszSCDP+MJ fqBg== Received: by 10.60.8.71 with SMTP id p7mr21563435oea.56.1344954187602; Tue, 14 Aug 2012 07:23:07 -0700 (PDT) Received: from barack.emea.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id kc5sm2799741obb.21.2012.08.14.07.23.04 (version=SSLv3 cipher=OTHER); Tue, 14 Aug 2012 07:23:07 -0700 (PDT) From: Peter Ujfalusi To: Mark Brown , Liam Girdwood , Tony Lindgren , Grant Likely , Rob Herring Cc: Tero Kristo , alsa-devel@alsa-project.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, Benoit Cousson , linux-kernel@vger.kernel.org Subject: [PATCH v2 10/14] ARM: OMAP/ASoC: Zoom2: Let the codec to handle the hs_extmute GPIO Date: Tue, 14 Aug 2012 17:22:38 +0300 Message-Id: <1344954162-7985-11-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1344954162-7985-1-git-send-email-peter.ujfalusi@ti.com> References: <1344954162-7985-1-git-send-email-peter.ujfalusi@ti.com> X-Gm-Message-State: ALoCoQlDn+lR+3QV38xuQtGNoYGmugn0m2sU00V8rS4jvg7o52AyVzGoc0eMuodkzu6EzL+ops/D 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 --- 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); }