From patchwork Wed Mar 26 21:38:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Freeman X-Patchwork-Id: 3895431 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 561A69F2E8 for ; Wed, 26 Mar 2014 21:39:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7CD7B20142 for ; Wed, 26 Mar 2014 21:39:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0EE2B2011E for ; Wed, 26 Mar 2014 21:39:10 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5FFFC265184; Wed, 26 Mar 2014 22:39:08 +0100 (CET) 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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3369E265141; Wed, 26 Mar 2014 22:38:58 +0100 (CET) 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 4B89726514C; Wed, 26 Mar 2014 22:38:57 +0100 (CET) Received: from hqemgate16.nvidia.com (hqemgate16.nvidia.com [216.228.121.65]) by alsa0.perex.cz (Postfix) with ESMTP id DF03A265133 for ; Wed, 26 Mar 2014 22:38:49 +0100 (CET) Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Wed, 26 Mar 2014 14:38:28 -0700 Received: from hqemhub02.nvidia.com ([172.20.12.94]) by hqnvupgp08.nvidia.com (PGP Universal service); Wed, 26 Mar 2014 14:34:39 -0700 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Wed, 26 Mar 2014 14:34:39 -0700 Received: from localhost.localdomain (172.20.144.16) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.327.1; Wed, 26 Mar 2014 14:38:47 -0700 From: To: Date: Wed, 26 Mar 2014 14:38:44 -0700 Message-ID: <1395869924-32195-1-git-send-email-cfreeman@nvidia.com> X-Mailer: git-send-email 1.8.3.2 MIME-Version: 1.0 Cc: 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)