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: 1509021 Return-Path: X-Original-To: patchwork-spi-devel-general@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by patchwork2.kernel.org (Postfix) with ESMTP id 3419CDFE81 for ; Wed, 26 Sep 2012 11:24:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.b.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TGpjJ-0004yt-Go; Wed, 26 Sep 2012 11:24:37 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1TGpjI-0004yn-62 for spi-devel-general@lists.sourceforge.net; Wed, 26 Sep 2012 11:24:36 +0000 X-ACL-Warn: Received: from eu1sys200aog105.obsmtp.com ([207.126.144.119]) by sog-mx-1.v43.ch3.sourceforge.com with smtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1TGpjH-0000m7-Cp for spi-devel-general@lists.sourceforge.net; 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-Score: -0.1 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.1 AWL AWL: From: address is in the auto white-list X-Headers-End: 1TGpjH-0000m7-Cp Cc: Vipul Kumar Samar , spi-devel-general@lists.sourceforge.net, spear-devel@list.st.com, linux-arm-kernel@lists.infradead.org X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net 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)