hwrng: stm32 - rework power management sequences
authorGatien Chevallier <gatien.chevallier@foss.st.com>
Thu, 21 Sep 2023 08:03:00 +0000 (10:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 1 Oct 2023 08:28:15 +0000 (16:28 +0800)
commitff4e46104f2e105c95ea84bda6350cea471d285d
tree6f4e9c8c564d9791c8e09465ebd25a2f3fc841ad
parenta1b03e7ade409125712313c04a97242e18aae88e
hwrng: stm32 - rework power management sequences

Implement stm32_rng_suspend()/stm32_rng_resume() low-power APIs
called when the hardware block context will be lost.

There is no need to save the RNG_CR register in
stm32_rng_runtime_suspend() as the context is not lost. Therefore,
only enable/disable the RNG in the runtime sequences.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/stm32-rng.c