summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJia Jie Ho <jiajie.ho@starfivetech.com>2023-12-12 04:25:27 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2023-12-22 05:30:19 +0100
commit9b2b61126a06bd272ce4783cf571b2e6a0474950 (patch)
tree0ecdd9960e3ca4d8827db9685199059424db3b88 /drivers/char
parentdt-bindings: rng: starfive: Add jh8100 compatible string (diff)
downloadlinux-9b2b61126a06bd272ce4783cf571b2e6a0474950.tar.xz
linux-9b2b61126a06bd272ce4783cf571b2e6a0474950.zip
hwrng: starfive - Add runtime pm ops
Define SET_RUNTIME_PM_OPS for StarFive TRNG driver. Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/jh7110-trng.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/hw_random/jh7110-trng.c b/drivers/char/hw_random/jh7110-trng.c
index b1f94e3c0c6a..9776f4daa044 100644
--- a/drivers/char/hw_random/jh7110-trng.c
+++ b/drivers/char/hw_random/jh7110-trng.c
@@ -369,8 +369,12 @@ static int __maybe_unused starfive_trng_resume(struct device *dev)
return 0;
}
-static DEFINE_SIMPLE_DEV_PM_OPS(starfive_trng_pm_ops, starfive_trng_suspend,
- starfive_trng_resume);
+static const struct dev_pm_ops starfive_trng_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(starfive_trng_suspend,
+ starfive_trng_resume)
+ SET_RUNTIME_PM_OPS(starfive_trng_suspend,
+ starfive_trng_resume, NULL)
+};
static const struct of_device_id trng_dt_ids[] __maybe_unused = {
{ .compatible = "starfive,jh7110-trng" },