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 <redacted>
---
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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/