summaryrefslogtreecommitdiff
path: root/drivers/crypto/omap-aes.c
diff options
context:
space:
mode:
authorMark A. Greer <mgreer@animalcreek.com>2013-01-08 22:57:41 +0400
committerHerbert Xu <herbert@gondor.apana.org.au>2013-01-20 03:16:42 +0400
commit0635fb3a3c6a6d1a70996428016dca6d3d8f0961 (patch)
tree099de85bb474ab796a686b82bbda2fd5d4c52f4c /drivers/crypto/omap-aes.c
parent5946c4a5e7707d255faf430969d344ad98430b69 (diff)
downloadlinux-0635fb3a3c6a6d1a70996428016dca6d3d8f0961.tar.xz
crypto: omap-aes - Add suspend/resume support
Add suspend/resume support to the OMAP AES driver. CC: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-aes.c')
-rw-r--r--drivers/crypto/omap-aes.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index c2298521388c..3262139eb9bd 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -891,12 +891,31 @@ static int omap_aes_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int omap_aes_suspend(struct device *dev)
+{
+ pm_runtime_put_sync(dev);
+ return 0;
+}
+
+static int omap_aes_resume(struct device *dev)
+{
+ pm_runtime_get_sync(dev);
+ return 0;
+}
+#endif
+
+static const struct dev_pm_ops omap_aes_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(omap_aes_suspend, omap_aes_resume)
+};
+
static struct platform_driver omap_aes_driver = {
.probe = omap_aes_probe,
.remove = omap_aes_remove,
.driver = {
.name = "omap-aes",
.owner = THIS_MODULE,
+ .pm = &omap_aes_pm_ops,
},
};