diff options
author | Ofir Drang <ofir.drang@arm.com> | 2019-06-17 10:46:29 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-06-27 08:28:00 +0200 |
commit | 3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c (patch) | |
tree | f44c64fa8ad02b19bd62575b3d5ba84ecd88c69a /drivers/crypto/ccree/cc_pm.h | |
parent | crypto: ccree - check that cryptocell reset completed (diff) | |
download | linux-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.h | 7 |
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__*/ |