summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccree/cc_pm.h
diff options
context:
space:
mode:
authorOfir Drang <ofir.drang@arm.com>2019-06-17 10:46:29 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-06-27 08:28:00 +0200
commit3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c (patch)
treef44c64fa8ad02b19bd62575b3d5ba84ecd88c69a /drivers/crypto/ccree/cc_pm.h
parentcrypto: ccree - check that cryptocell reset completed (diff)
downloadlinux-3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c.tar.xz
linux-3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c.zip
crypto: ccree - prevent isr handling in case driver is suspended
ccree irq may be shared with other devices, in order to prevent ccree isr handling while device maybe suspended we added a check to verify that the device is not suspended. Signed-off-by: Ofir Drang <ofir.drang@arm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_pm.h')
-rw-r--r--drivers/crypto/ccree/cc_pm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/crypto/ccree/cc_pm.h b/drivers/crypto/ccree/cc_pm.h
index 6190cdba5dad..a7d98a5da2e1 100644
--- a/drivers/crypto/ccree/cc_pm.h
+++ b/drivers/crypto/ccree/cc_pm.h
@@ -22,6 +22,7 @@ int cc_pm_suspend(struct device *dev);
int cc_pm_resume(struct device *dev);
int cc_pm_get(struct device *dev);
int cc_pm_put_suspend(struct device *dev);
+bool cc_pm_is_dev_suspended(struct device *dev);
#else
@@ -54,6 +55,12 @@ static inline int cc_pm_put_suspend(struct device *dev)
return 0;
}
+static inline bool cc_pm_is_dev_suspended(struct device *dev)
+{
+ /* if PM not supported device is never suspend */
+ return false;
+}
+
#endif
#endif /*__POWER_MGR_H__*/