diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2013-01-08 13:57:41 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-01-19 18:16:42 -0500 |
commit | 0635fb3a3c6a6d1a70996428016dca6d3d8f0961 (patch) | |
tree | 099de85bb474ab796a686b82bbda2fd5d4c52f4c /drivers/crypto/omap-aes.c | |
parent | 5946c4a5e7707d255faf430969d344ad98430b69 (diff) |
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.c | 19 |
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) | |||
891 | return 0; | 891 | return 0; |
892 | } | 892 | } |
893 | 893 | ||
894 | #ifdef CONFIG_PM_SLEEP | ||
895 | static int omap_aes_suspend(struct device *dev) | ||
896 | { | ||
897 | pm_runtime_put_sync(dev); | ||
898 | return 0; | ||
899 | } | ||
900 | |||
901 | static int omap_aes_resume(struct device *dev) | ||
902 | { | ||
903 | pm_runtime_get_sync(dev); | ||
904 | return 0; | ||
905 | } | ||
906 | #endif | ||
907 | |||
908 | static const struct dev_pm_ops omap_aes_pm_ops = { | ||
909 | SET_SYSTEM_SLEEP_PM_OPS(omap_aes_suspend, omap_aes_resume) | ||
910 | }; | ||
911 | |||
894 | static struct platform_driver omap_aes_driver = { | 912 | static struct platform_driver omap_aes_driver = { |
895 | .probe = omap_aes_probe, | 913 | .probe = omap_aes_probe, |
896 | .remove = omap_aes_remove, | 914 | .remove = omap_aes_remove, |
897 | .driver = { | 915 | .driver = { |
898 | .name = "omap-aes", | 916 | .name = "omap-aes", |
899 | .owner = THIS_MODULE, | 917 | .owner = THIS_MODULE, |
918 | .pm = &omap_aes_pm_ops, | ||
900 | }, | 919 | }, |
901 | }; | 920 | }; |
902 | 921 | ||