From patchwork Mon Nov 17 15:07:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5322341 Return-Path: X-Original-To: patchwork-linux-arm@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 A5D6AC11AC for ; Mon, 17 Nov 2014 15:11:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C9C652010E for ; Mon, 17 Nov 2014 15:11:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0C7C20103 for ; Mon, 17 Nov 2014 15:11:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqNvh-0006mq-Fo; Mon, 17 Nov 2014 15:09:25 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XqNus-0005dF-8d for linux-arm-kernel@lists.infradead.org; Mon, 17 Nov 2014 15:08:35 +0000 Received: by mail-pa0-f48.google.com with SMTP id rd3so8771250pab.7 for ; Mon, 17 Nov 2014 07:08:12 -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:in-reply-to:references; bh=o28vmxbsN99hSJ54gmubdcoAq/ik2PvrSp2IdKraiW8=; b=ak47CIWtdejoOSPgxOLPzCi8wU6xCKhZmNgDCGFyLz+XUFJoGtbhUTTBihncLCIV1a 2e/ulbIWIn/EiiTxXtKF+xT/kduAwNBKhHBqlCxQp6ZZSA2n16gBvyaPBsKoHrnRujeN /lmKzwGJM1B+zk0kfkwelCLbrgDXiLv0OouvyKHkjhxBlcXDdhiSRbwOrznDzrweOW0W iA0A7sMlhTmXtLcuktldzU2NEXE/1pIKkmJp3Bdab9ErkPVj3OaUVFbVB+BcuvU0BIG0 JMvKPMAVowBVcrp6eefDy2NAg+l6ph8ViHmm/bwlZK7+NBNjy0tbPeURRzSsuTmsfHJW c3QQ== X-Received: by 10.68.138.196 with SMTP id qs4mr30590771pbb.39.1416236892483; Mon, 17 Nov 2014 07:08:12 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id px9sm13659040pbb.84.2014.11.17.07.08.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Nov 2014 07:08:11 -0800 (PST) From: Dmitry Eremin-Solenikov To: Robert Jarzmik , Daniel Mack , Haojian Zhuang , Greg Kroah-Hartman , Wolfram Sang , Samuel Ortiz , Lee Jones , Felipe Balbi Subject: [PATCH V2 4/5] mfd: t7l66xb: prepare/unprepare clocks Date: Mon, 17 Nov 2014 18:07:42 +0300 Message-Id: <1416236863-20898-4-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1416236863-20898-1-git-send-email-dbaryshkov@gmail.com> References: <1416236863-20898-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141117_070834_403621_8B8B0765 X-CRM114-Status: GOOD ( 10.20 ) X-Spam-Score: -0.8 (/) Cc: linux-usb@vger.kernel.org, Jiri Slaby , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change clk_enable/disable() calls to clk_prepare_enable() and clk_disable_unprepare(). Signed-off-by: Dmitry Eremin-Solenikov --- drivers/mfd/t7l66xb.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index 9e04a74..439d905 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c @@ -87,7 +87,7 @@ static int t7l66xb_mmc_enable(struct platform_device *mmc) unsigned long flags; u8 dev_ctl; - clk_enable(t7l66xb->clk32k); + clk_prepare_enable(t7l66xb->clk32k); spin_lock_irqsave(&t7l66xb->lock, flags); @@ -118,7 +118,7 @@ static int t7l66xb_mmc_disable(struct platform_device *mmc) spin_unlock_irqrestore(&t7l66xb->lock, flags); - clk_disable(t7l66xb->clk32k); + clk_disable_unprepare(t7l66xb->clk32k); return 0; } @@ -285,7 +285,7 @@ static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state) if (pdata && pdata->suspend) pdata->suspend(dev); - clk_disable(t7l66xb->clk48m); + clk_disable_unprepare(t7l66xb->clk48m); return 0; } @@ -295,7 +295,7 @@ static int t7l66xb_resume(struct platform_device *dev) struct t7l66xb *t7l66xb = platform_get_drvdata(dev); struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); - clk_enable(t7l66xb->clk48m); + clk_prepare_enable(t7l66xb->clk48m); if (pdata && pdata->resume) pdata->resume(dev); @@ -369,7 +369,7 @@ static int t7l66xb_probe(struct platform_device *dev) goto err_ioremap; } - clk_enable(t7l66xb->clk48m); + clk_prepare_enable(t7l66xb->clk48m); if (pdata && pdata->enable) pdata->enable(dev); @@ -414,9 +414,9 @@ static int t7l66xb_remove(struct platform_device *dev) int ret; ret = pdata->disable(dev); - clk_disable(t7l66xb->clk48m); + clk_disable_unprepare(t7l66xb->clk48m); clk_put(t7l66xb->clk48m); - clk_disable(t7l66xb->clk32k); + clk_disable_unprepare(t7l66xb->clk32k); clk_put(t7l66xb->clk32k); t7l66xb_detach_irq(dev); iounmap(t7l66xb->scr);