clk_disable_unprepare(dev->sclk);
 }
 
+/*
+ * Power management strategy: The device is suspended unless a TFM exists for
+ * one of the algorithms proposed by this driver.
+ */
+static int rk_crypto_pm_suspend(struct device *dev)
+{
+       struct rk_crypto_info *rkdev = dev_get_drvdata(dev);
+
+       rk_crypto_disable_clk(rkdev);
+       return 0;
+}
+
+static int rk_crypto_pm_resume(struct device *dev)
+{
+       struct rk_crypto_info *rkdev = dev_get_drvdata(dev);
+
+       return rk_crypto_enable_clk(rkdev);
+}
+
+static const struct dev_pm_ops rk_crypto_pm_ops = {
+       SET_RUNTIME_PM_OPS(rk_crypto_pm_suspend, rk_crypto_pm_resume, NULL)
+};
+
+static int rk_crypto_pm_init(struct rk_crypto_info *rkdev)
+{
+       int err;
+
+       pm_runtime_use_autosuspend(rkdev->dev);
+       pm_runtime_set_autosuspend_delay(rkdev->dev, 2000);
+
+       err = pm_runtime_set_suspended(rkdev->dev);
+       if (err)
+               return err;
+       pm_runtime_enable(rkdev->dev);
+       return err;
+}
+
+static void rk_crypto_pm_exit(struct rk_crypto_info *rkdev)
+{
+       pm_runtime_disable(rkdev->dev);
+}
+
 static irqreturn_t rk_crypto_irq_handle(int irq, void *dev_id)
 {
        struct rk_crypto_info *dev  = platform_get_drvdata(dev_id);
        crypto_engine_start(crypto_info->engine);
        init_completion(&crypto_info->complete);
 
-       rk_crypto_enable_clk(crypto_info);
+       err = rk_crypto_pm_init(crypto_info);
+       if (err)
+               goto err_pm;
 
        err = rk_crypto_register(crypto_info);
        if (err) {
        return 0;
 
 err_register_alg:
+       rk_crypto_pm_exit(crypto_info);
+err_pm:
        crypto_engine_exit(crypto_info->engine);
 err_crypto:
        dev_err(dev, "Crypto Accelerator not successfully registered\n");
        debugfs_remove_recursive(crypto_tmp->dbgfs_dir);
 #endif
        rk_crypto_unregister();
-       rk_crypto_disable_clk(crypto_tmp);
+       rk_crypto_pm_exit(crypto_tmp);
        crypto_engine_exit(crypto_tmp->engine);
        return 0;
 }
        .remove         = rk_crypto_remove,
        .driver         = {
                .name   = "rk3288-crypto",
+               .pm             = &rk_crypto_pm_ops,
                .of_match_table = crypto_of_id_table,
        },
 };
 
        struct ahash_alg *alg = __crypto_ahash_alg(tfm->__crt_alg);
 
        const char *alg_name = crypto_tfm_alg_name(tfm);
+       int err;
 
        algt = container_of(alg, struct rk_crypto_tmp, alg.hash);
 
        tctx->enginectx.op.prepare_request = rk_hash_prepare;
        tctx->enginectx.op.unprepare_request = rk_hash_unprepare;
 
+       err = pm_runtime_resume_and_get(tctx->dev->dev);
+       if (err < 0)
+               goto error_pm;
+
        return 0;
+error_pm:
+       crypto_free_ahash(tctx->fallback_tfm);
+
+       return err;
 }
 
 static void rk_cra_hash_exit(struct crypto_tfm *tfm)
        struct rk_ahash_ctx *tctx = crypto_tfm_ctx(tfm);
 
        crypto_free_ahash(tctx->fallback_tfm);
+       pm_runtime_put_autosuspend(tctx->dev->dev);
 }
 
 struct rk_crypto_tmp rk_ahash_sha1 = {
 
        struct skcipher_alg *alg = crypto_skcipher_alg(tfm);
        const char *name = crypto_tfm_alg_name(&tfm->base);
        struct rk_crypto_tmp *algt;
+       int err;
 
        algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher);
 
 
        ctx->enginectx.op.do_one_request = rk_cipher_run;
 
+       err = pm_runtime_resume_and_get(ctx->dev->dev);
+       if (err < 0)
+               goto error_pm;
+
        return 0;
+error_pm:
+       crypto_free_skcipher(ctx->fallback_tfm);
+       return err;
 }
 
 static void rk_ablk_exit_tfm(struct crypto_skcipher *tfm)
 
        memzero_explicit(ctx->key, ctx->keylen);
        crypto_free_skcipher(ctx->fallback_tfm);
+       pm_runtime_put_autosuspend(ctx->dev->dev);
 }
 
 struct rk_crypto_tmp rk_ecb_aes_alg = {