aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/ccree/cc_pm.c
diff options
context:
space:
mode:
authorOfir Drang <[email protected]>2019-06-17 11:46:29 +0300
committerHerbert Xu <[email protected]>2019-06-27 14:28:00 +0800
commit3db617e77ae2f8051fd6f5d3fff0e15f086d5b4c (patch)
treef44c64fa8ad02b19bd62575b3d5ba84ecd88c69a /drivers/crypto/ccree/cc_pm.c
parentd84f6269ce24eb4c468e246b24fc0fdce34ab6f6 (diff)
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
Diffstat (limited to 'drivers/crypto/ccree/cc_pm.c')
-rw-r--r--drivers/crypto/ccree/cc_pm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c
index 20f7f3d34e27..899a52f05b7a 100644
--- a/drivers/crypto/ccree/cc_pm.c
+++ b/drivers/crypto/ccree/cc_pm.c
@@ -106,6 +106,12 @@ int cc_pm_put_suspend(struct device *dev)
return rc;
}
+bool cc_pm_is_dev_suspended(struct device *dev)
+{
+ /* check device state using runtime api */
+ return pm_runtime_suspended(dev);
+}
+
int cc_pm_init(struct cc_drvdata *drvdata)
{
struct device *dev = drvdata_to_dev(drvdata);