linux/drivers/char/hw_random
Markus Schneider-Pargmann 6a16100141 hwrng: mtk - Force runtime pm ops for sleep ops
[ Upstream commit b6f5f0c8f7 ]

Currently mtk_rng_runtime_suspend/resume is called for both runtime pm
and system sleep operations.

This is wrong as these should only be runtime ops as the name already
suggests. Currently freezing the system will lead to a call to
mtk_rng_runtime_suspend even if the device currently isn't active. This
leads to a clock warning because it is disabled/unprepared although it
isn't enabled/prepared currently.

This patch fixes this by only setting the runtime pm ops and forces to
call the runtime pm ops from the system sleep ops as well if active but
not otherwise.

Fixes: 81d2b34508 ("hwrng: mtk - add runtime PM support")
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:06 +01:00
..
amd-rng.c
atmel-rng.c hwrng: atmel - add new platform support for sam9x60 2019-11-15 13:44:17 +08:00
ba431-rng.c hwrng: ba431 - Include kernel.h 2020-07-16 21:49:01 +10:00
bcm2835-rng.c hwrng: bcm2835 - Constify bcm2835_rng_devtype[] 2020-07-09 18:25:21 +10:00
cavium-rng-vf.c hwrng: drivers - Use device-managed registration API 2019-08-02 14:44:33 +10:00
cavium-rng.c
cctrng.c hwrng: cctrn - Simplify with dev_err_probe() 2020-09-04 17:57:15 +10:00
cctrng.h hwrng: cctrng - introduce Arm CryptoCell driver 2020-04-16 16:49:20 +10:00
core.c hwrng: core - remove redundant initialization of variable ret 2020-07-31 18:25:29 +10:00
exynos-trng.c hwrng: exynos - Fix runtime PM imbalance on error 2021-07-14 16:55:50 +02:00
geode-rng.c
hisi-rng.c hwrng: hisi - Fix W=1 unused variable warning 2020-07-09 18:25:12 +10:00
hisi-trng-v2.c hwrng: hisi - add HiSilicon TRNG driver support 2019-11-08 23:15:51 +08:00
imx-rngc.c hwrng: imx-rngc - add quality to use it as kernel entropy pool 2020-09-11 14:39:14 +10:00
ingenic-rng.c crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc 2020-08-21 14:43:51 +10:00
ingenic-trng.c hwrng: ingenic - Fix a resource leak in an error handling path 2021-03-04 11:37:37 +01:00
intel-rng.c hwrng: intel - cleanup initialization 2020-08-21 14:47:49 +10:00
iproc-rng200.c hwrng: iproc-rng200 - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
ixp4xx-rng.c
Kconfig um: random: Register random as hwrng-core device 2021-01-06 14:56:55 +01:00
ks-sa-rng.c hwrng: ks-sa - Replace HTTP links with HTTPS ones 2020-07-16 21:49:06 +10:00
Makefile hwrng: ingenic - Add hardware TRNG for Ingenic X1830 2020-09-25 17:46:41 +10:00
meson-rng.c hwrng: meson - use devm_platform_ioremap_resource() to simplify code 2019-10-26 02:09:55 +11:00
mtk-rng.c hwrng: mtk - Force runtime pm ops for sleep ops 2021-11-18 14:04:06 +01:00
mxc-rnga.c hwrng: mxc-rnga - use semicolons rather than commas to separate statements 2020-10-02 18:02:15 +10:00
n2-asm.S
n2-drv.c hwrng: n2-drv - fix typo 2019-08-08 12:07:49 +10:00
n2rng.h
nomadik-rng.c hwrng: nomadik - Constify nmk_rng_ids[] 2020-07-09 18:25:21 +10:00
npcm-rng.c hwrng: npcm - modify readl to readb 2020-10-02 18:02:13 +10:00
octeon-rng.c hwrng: octeon - Fix sparse warnings 2020-07-09 18:25:14 +10:00
omap-rng.c hwrng: omap - Fix W=1 unused variable warning 2020-07-09 18:25:11 +10:00
omap3-rom-rng.c change email address for Pali Rohár 2020-04-10 15:36:22 -07:00
optee-rng.c hwrng: optee - fix wait use case 2020-08-21 14:45:28 +10:00
pasemi-rng.c hwrng: pasemi - use devm_platform_ioremap_resource() to simplify code 2019-10-26 02:09:56 +11:00
pic32-rng.c hwrng: pic32 - Fix W=1 unused variable warning 2020-07-09 18:25:13 +10:00
powernv-rng.c hwrng: drivers - Use device-managed registration API 2019-08-02 14:44:33 +10:00
pseries-rng.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
s390-trng.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 376 2019-06-05 17:37:10 +02:00
st-rng.c hwrng: st - Fix W=1 unused variable warning 2020-07-09 18:25:12 +10:00
stm32-rng.c hwrng: stm32 - use semicolons rather than commas to separate statements 2020-10-02 18:02:14 +10:00
timeriomem-rng.c hwrng: timeriomem - Fix cooldown period calculation 2021-03-04 11:37:49 +01:00
tx4939-rng.c hwrng: tx4939 - use devm_platform_ioremap_resource() to simplify code 2019-10-26 02:09:57 +11:00
via-rng.c hwrng: via_rng: Convert to new X86 CPU match macros 2020-03-24 21:36:26 +01:00
virtio-rng.c hwrng: virtio - Constify id_table[] 2020-07-09 18:25:21 +10:00
xgene-rng.c hwrng: xgene - Delete an error message in xgene_rng_probe() 2020-04-16 16:49:22 +10:00
xiphera-trng.c hwrng: xiphera-trng: add support for XIP8001B hwrng 2020-09-11 14:39:17 +10:00