Re: [PATCH v2] hwrng: imx-rngc - add runtime pm
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-02-09 10:25:45
Also in:
linux-crypto, lkml
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-02-09 10:25:45
Also in:
linux-crypto, lkml
On Sat, Feb 01, 2025 at 07:39:07PM +0100, Martin Kaiser wrote:
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 <redacted> --- v2: - remove unnecessary err = 0; assignment drivers/char/hw_random/imx-rngc.c | 69 +++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 17 deletions(-)
Patch applied. Thanks. -- Email: Herbert Xu [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt