pmdomain: mediatek: fix race conditions with genpdcommit c41336f4d69057cbf88fed47951379b384540df5 upstream.If the power domains are registered first with genpd and *after that*the driver attempt
pmdomain: mediatek: fix race conditions with genpdcommit c41336f4d69057cbf88fed47951379b384540df5 upstream.If the power domains are registered first with genpd and *after that*the driver attempts to power them on in the probe sequence, then it ispossible that a race condition occurs if genpd tries to power them onin the same time.The same is valid for powering them off before unregistering themfrom genpd.Attempt to fix race conditions by first removing the domains from genpdand *after that* powering down domains.Also first power up the domains and *after that* register themto genpd.Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains")Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com>Cc: stable@vger.kernel.orgLink: https://lore.kernel.org/r/20231225133615.78993-1-eugen.hristev@collabora.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
pmdomain: Rename the genpd subsystem to pmdomainIt has been pointed out that naming a subsystem "genpd" isn't veryself-explanatory and the acronym itself that means Generic PM Domain, isknown onl
pmdomain: Rename the genpd subsystem to pmdomainIt has been pointed out that naming a subsystem "genpd" isn't veryself-explanatory and the acronym itself that means Generic PM Domain, isknown only by a limited group of people.In a way to improve the situation, let's rename the subsystem to pmdomain,which ideally should indicate that this is about so called Power Domains or"PM domains" as we often also use within the Linux Kernel terminology.Suggested-by: Rafael J. Wysocki <rafael@kernel.org>Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>Reviewed-by: Linus Walleij <linus.walleij@linaro.org>Acked-by: Arnd Bergmann <arnd@arndb.de>Acked-by: Heiko Stuebner <heiko@sntech.de>Acked-by: Rafael J. Wysocki <rafael@kernel.org>Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>Link: https://lore.kernel.org/r/20230912221127.487327-1-ulf.hansson@linaro.org