From: vipulkumar.samar@st.com (Vipul Kumar Samar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] spi:pl022: Disable/Enable functional clock from suspend/resume
Date: Wed, 26 Sep 2012 16:54:06 +0530 [thread overview]
Message-ID: <1348658647-25975-2-git-send-email-vipulkumar.samar@st.com> (raw)
In-Reply-To: <1348658647-25975-1-git-send-email-vipulkumar.samar@st.com>
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 <vipulkumar.samar@st.com>
---
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)
--
1.7.10
next prev parent reply other threads:[~2012-09-26 11:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 11:24 [PATCH 0/2] ARM: AMBA: Fix clock disable/enable issue in conventional suspend/resume Vipul Kumar Samar
2012-09-26 11:24 ` Vipul Kumar Samar [this message]
2012-09-26 12:17 ` [PATCH 1/2] spi:pl022: Disable/Enable functional clock from suspend/resume Linus Walleij
2012-09-26 12:19 ` Mark Brown
2012-09-26 12:41 ` Linus Walleij
2012-09-27 17:03 ` Mark Brown
2012-09-26 14:08 ` viresh kumar
2012-09-26 14:13 ` Linus Walleij
2012-09-26 11:24 ` [PATCH 2/2] ARM: ABMA: Disable/Enable interface " Vipul Kumar Samar
2012-09-26 12:38 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348658647-25975-2-git-send-email-vipulkumar.samar@st.com \
--to=vipulkumar.samar@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).