From patchwork Thu Apr 3 22:03:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Freeman X-Patchwork-Id: 3934081 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5E6BABFF02 for ; Thu, 3 Apr 2014 22:04:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D992201ED for ; Thu, 3 Apr 2014 22:04:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 17563201B9 for ; Thu, 3 Apr 2014 22:04:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B5CBC26570E; Fri, 4 Apr 2014 00:04:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id ADEA72656F4; Fri, 4 Apr 2014 00:04:10 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BD2322656F6; Fri, 4 Apr 2014 00:04:09 +0200 (CEST) Received: from hqemgate16.nvidia.com (hqemgate16.nvidia.com [216.228.121.65]) by alsa0.perex.cz (Postfix) with ESMTP id 3C2D82656F1 for ; Fri, 4 Apr 2014 00:04:01 +0200 (CEST) Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Thu, 03 Apr 2014 15:03:12 -0700 Received: from hqemhub02.nvidia.com ([172.20.12.94]) by hqnvupgp07.nvidia.com (PGP Universal service); Thu, 03 Apr 2014 14:57:14 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Thu, 03 Apr 2014 14:57:14 -0700 Received: from ubuntu.nvidia.com (172.20.144.16) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.327.1; Thu, 3 Apr 2014 15:03:59 -0700 From: To: Date: Thu, 3 Apr 2014 15:03:55 -0700 Message-ID: <1396562635-9753-1-git-send-email-cfreeman@nvidia.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Cc: broonie@kernel.org, lgirdwood@gmail.com, Christopher Freeman Subject: [alsa-devel] [PATCH] ASoC: jack: export gpio detect X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Christopher Freeman Export the gpio detect function so machine drivers may call it. Interrupts for the jack may be disabled during sleep, so this allows a machine driver to have the jack status updated during resume. Signed-off-by: Christopher Freeman --- include/sound/soc.h | 1 + sound/soc/soc-jack.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index a6a059c..36383cb 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -442,6 +442,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios); void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, struct snd_soc_jack_gpio *gpios); +void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio); #endif /* codec register bit access */ diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 0bb5ccc..fd97cc5 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c @@ -231,7 +231,7 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_notifier_unregister); #ifdef CONFIG_GPIOLIB /* gpio detect */ -static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) +void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) { struct snd_soc_jack *jack = gpio->jack; int enable; @@ -251,6 +251,7 @@ static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) snd_soc_jack_report(jack, report, gpio->report); } +EXPORT_SYMBOL_GPL(snd_soc_jack_gpio_detect); /* irq handler for gpio pin */ static irqreturn_t gpio_handler(int irq, void *data)