From patchwork Wed Sep 26 11:24:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vipul kumar samar X-Patchwork-Id: 1509051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 9B41ADF238 for ; Wed, 26 Sep 2012 11:26:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TGpje-0003uF-Ms; Wed, 26 Sep 2012 11:24:58 +0000 Received: from eu1sys200aog105.obsmtp.com ([207.126.144.119]) by merlin.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGpjH-0003sP-CX for linux-arm-kernel@lists.infradead.org; Wed, 26 Sep 2012 11:24:36 +0000 Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKUGLl323Efqm75/PdtpDODkS4eQgjvRr6@postini.com; Wed, 26 Sep 2012 11:24:34 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 9D9DCC6; Wed, 26 Sep 2012 11:15:57 +0000 (GMT) Received: from Webmail-ap.st.com (eapex1hubcas4.st.com [10.80.176.69]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6B93F930; Wed, 26 Sep 2012 11:24:12 +0000 (GMT) Received: from localhost (10.199.88.141) by Webmail-ap.st.com (10.80.176.7) with Microsoft SMTP Server (TLS) id 8.3.192.1; Wed, 26 Sep 2012 19:24:12 +0800 From: Vipul Kumar Samar To: , , Subject: [PATCH 1/2] spi:pl022: Disable/Enable functional clock from suspend/resume Date: Wed, 26 Sep 2012 16:54:06 +0530 Message-ID: <1348658647-25975-2-git-send-email-vipulkumar.samar@st.com> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <1348658647-25975-1-git-send-email-vipulkumar.samar@st.com> References: <1348658647-25975-1-git-send-email-vipulkumar.samar@st.com> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [207.126.144.119 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Vipul Kumar Samar , spi-devel-general@lists.sourceforge.net, spear-devel@list.st.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org SPI functional clock must be disalble/enable in non RTPM suspend/resume hooks. Currently it is only done for RTPM cases. This patch add support to disable/enbale clock for conventional suspend/resume calls. Signed-off-by: Vipul Kumar Samar --- drivers/spi/spi-pl022.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index f2a80ff..09fb09e 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2310,6 +2310,8 @@ static int pl022_suspend(struct device *dev) } dev_dbg(dev, "suspended\n"); + clk_disable(pl022->clk); + return 0; } @@ -2318,6 +2320,12 @@ static int pl022_resume(struct device *dev) struct pl022 *pl022 = dev_get_drvdata(dev); int ret; + ret = clk_enable(pl022->clk); + if (ret) { + dev_err(dev, "could not enable SSP/SPI bus clock\n"); + return ret; + } + /* Start the queue running */ ret = spi_master_resume(pl022->master); if (ret)