diff options
author | Mark A. Greer <mgreer@animalcreek.com> | 2012-12-21 10:04:03 -0700 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-01-05 21:43:56 +1100 |
commit | 3b3f440023b3809c8eabec681768a4bcee15f2b4 (patch) | |
tree | 73b94756ccb7a1259aaf8ce105ea227c1dd2b8aa /drivers/crypto | |
parent | b359f034c8bf6c6ae4785c1172786ce73eccf9f2 (diff) | |
download | op-kernel-dev-3b3f440023b3809c8eabec681768a4bcee15f2b4.zip op-kernel-dev-3b3f440023b3809c8eabec681768a4bcee15f2b4.tar.gz |
crypto: omap-sham - Add suspend/resume support
Add suspend/resume support to the OMAP SHAM 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')
-rw-r--r-- | drivers/crypto/omap-sham.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 777eb9f..9c3b096 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1269,12 +1269,31 @@ static int __devexit omap_sham_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM_SLEEP +static int omap_sham_suspend(struct device *dev) +{ + pm_runtime_put_sync(dev); + return 0; +} + +static int omap_sham_resume(struct device *dev) +{ + pm_runtime_get_sync(dev); + return 0; +} +#endif + +static const struct dev_pm_ops omap_sham_pm_ops = { + SET_SYSTEM_SLEEP_PM_OPS(omap_sham_suspend, omap_sham_resume) +}; + static struct platform_driver omap_sham_driver = { .probe = omap_sham_probe, .remove = omap_sham_remove, .driver = { .name = "omap-sham", .owner = THIS_MODULE, + .pm = &omap_sham_pm_ops, }, }; |