From patchwork Sat Nov 15 19:51:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5312131 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 EEA8D9F440 for ; Sat, 15 Nov 2014 19:52:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 197EB20160 for ; Sat, 15 Nov 2014 19:52:22 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D264A200D5 for ; Sat, 15 Nov 2014 19:52:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 63F7E260634; Sat, 15 Nov 2014 20:52:19 +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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 12A6C260626; Sat, 15 Nov 2014 20:52:09 +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 5A2BC260628; Sat, 15 Nov 2014 20:52:07 +0100 (CET) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by alsa0.perex.cz (Postfix) with ESMTP id 14D072605FA for ; Sat, 15 Nov 2014 20:51:59 +0100 (CET) Received: by mail-wi0-f182.google.com with SMTP id h11so5631431wiw.9 for ; Sat, 15 Nov 2014 11:51:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=sfXJYg7olni4IxPvR04Cmhg0UigOPzymjk5eRZMR7IM=; b=NoVxSE+HoqPnRe2zNT0VPauXeYhb+inqegcb+WBs7HoATZBDZxTS8MCECarJj5gEiJ Xn3icLB0cDghzjXZ7Orezh6H809TsFJEjpl2dEdnC5EAK+aqTB7yq3jMh3G27m1cuTka j+PM+4LLTCtVxCGE+yjcWQgCBaKCPLPCXzucSgCluoquuayZRUzMQlr/6nfEC7XtarSa mX25TzQCN942VGx51ibs8amu/0wpTJ3uqsSPDHW848YiHil1kxwZZoIFWOVXKdZsERzE AJmPHBPWJdknQXUPHCCZqodeM9BctuLht2H4j/IMtdh41DbnoTksDZxVm6XEZbE2QQnx JrfQ== X-Received: by 10.180.90.65 with SMTP id bu1mr18176817wib.71.1416081118756; Sat, 15 Nov 2014 11:51:58 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id w5sm8166549wif.18.2014.11.15.11.51.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Nov 2014 11:51:57 -0800 (PST) From: Dmitry Eremin-Solenikov To: Mark Brown , Robert Jarzmik , Daniel Mack , Haojian Zhuang Date: Sat, 15 Nov 2014 22:51:46 +0300 Message-Id: <1416081106-28324-1-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] ASoC: pxa: prepare/unprepare clocks in pxa-ssp 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Change clk_enable/disable() calls to clk_prepare_enable() and clk_disable_unrepapre(). Signed-off-by: Dmitry Eremin-Solenikov --- sound/soc/pxa/pxa-ssp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index a8e0974..cbba063 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c @@ -97,7 +97,7 @@ static int pxa_ssp_startup(struct snd_pcm_substream *substream, int ret = 0; if (!cpu_dai->active) { - clk_enable(ssp->clk); + clk_prepare_enable(ssp->clk); pxa_ssp_disable(ssp); } @@ -121,7 +121,7 @@ static void pxa_ssp_shutdown(struct snd_pcm_substream *substream, if (!cpu_dai->active) { pxa_ssp_disable(ssp); - clk_disable(ssp->clk); + clk_disable_unprepare(ssp->clk); } kfree(snd_soc_dai_get_dma_data(cpu_dai, substream)); @@ -136,7 +136,7 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai) struct ssp_device *ssp = priv->ssp; if (!cpu_dai->active) - clk_enable(ssp->clk); + clk_prepare_enable(ssp->clk); priv->cr0 = __raw_readl(ssp->mmio_base + SSCR0); priv->cr1 = __raw_readl(ssp->mmio_base + SSCR1); @@ -144,7 +144,7 @@ static int pxa_ssp_suspend(struct snd_soc_dai *cpu_dai) priv->psp = __raw_readl(ssp->mmio_base + SSPSP); pxa_ssp_disable(ssp); - clk_disable(ssp->clk); + clk_disable_unprepare(ssp->clk); return 0; } @@ -154,7 +154,7 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) struct ssp_device *ssp = priv->ssp; uint32_t sssr = SSSR_ROR | SSSR_TUR | SSSR_BCE; - clk_enable(ssp->clk); + clk_prepare_enable(ssp->clk); __raw_writel(sssr, ssp->mmio_base + SSSR); __raw_writel(priv->cr0 & ~SSCR0_SSE, ssp->mmio_base + SSCR0); @@ -165,7 +165,7 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) if (cpu_dai->active) pxa_ssp_enable(ssp); else - clk_disable(ssp->clk); + clk_disable_unprepare(ssp->clk); return 0; } @@ -256,11 +256,11 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, /* The SSP clock must be disabled when changing SSP clock mode * on PXA2xx. On PXA3xx it must be enabled when doing so. */ if (ssp->type != PXA3xx_SSP) - clk_disable(ssp->clk); + clk_disable_unprepare(ssp->clk); val = pxa_ssp_read_reg(ssp, SSCR0) | sscr0; pxa_ssp_write_reg(ssp, SSCR0, val); if (ssp->type != PXA3xx_SSP) - clk_enable(ssp->clk); + clk_prepare_enable(ssp->clk); return 0; }