]> www.infradead.org Git - users/dwmw2/linux.git/commit
hwrng: imx-rngc - add runtime pm
authorMartin Kaiser <martin@kaiser.cx>
Sat, 1 Feb 2025 18:39:07 +0000 (19:39 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 9 Feb 2025 10:08:12 +0000 (18:08 +0800)
commit7a96a64e8689f33c60ff3179ee4bec2b0835eed9
treeb4352f3cddad113648b8d1e234aa54cd0aca1035
parent1a3fa1c063fb0ef804d9d31136f02305394a68a3
hwrng: imx-rngc - add runtime pm

Add runtime power management to the imx-rngc driver. Disable the
peripheral clock when the rngc is idle.

The callback functions from struct hwrng wake the rngc up when they're
called and set it to idle on exit. Helper functions which are invoked
from the callbacks assume that the rngc is active.

Device init and probe are done before runtime pm is enabled. The
peripheral clock will be handled manually during these steps. Do not use
devres any more to enable/disable the peripheral clock, this conflicts
with runtime pm.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/imx-rngc.c