linux-stable/drivers/pmdomain
Viresh Kumar 22f92238d7 OPP: Fix required_opp_tables for multiple genpds using same table
[ Upstream commit 2a56c462fe ]

The required_opp_tables parsing is not perfect, as the OPP core does the
parsing solely based on the DT node pointers.

The core sets the required_opp_tables entry to the first OPP table in
the "opp_tables" list, that matches with the node pointer.

If the target DT OPP table is used by multiple devices and they all
create separate instances of 'struct opp_table' from it, then it is
possible that the required_opp_tables entry may be set to the incorrect
sibling device.

Unfortunately, there is no clear way to initialize the right values
during the initial parsing and we need to do this at a later point of
time.

Cross check the OPP table again while the genpds are attached and fix
them if required.

Also add a new API for the genpd core to fetch the device pointer for
the genpd.

Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Reported-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218682
Co-developed-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-27 13:52:19 +02:00
..
actions pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
amlogic pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain 2023-11-30 12:05:21 +01:00
apple pmdomain: apple: Move Kconfig option to the pmdomain subsystem 2023-09-20 10:08:49 +02:00
arm pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal 2024-02-13 13:04:19 +01:00
bcm pmdomain: Merge branch fixes into next 2023-10-26 16:01:03 +02:00
imx pmdomain: core: constify of_phandle_args in xlate 2024-02-14 10:26:11 +01:00
mediatek pmdomain: mediatek: Use devm_platform_ioremap_resource() in init_scp() 2024-02-14 10:26:11 +01:00
qcom Core: 2024-03-13 11:33:10 -07:00
renesas pmdomain: renesas: rcar-gen4-sysc: Reduce atomic delays 2024-03-06 11:25:27 +01:00
rockchip pmdomain: Use device_get_match_data() 2023-10-17 11:45:11 +02:00
samsung pmdomain: samsung: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
st pmdomain: st: Add a Kconfig option for the ux500 power domain 2023-10-04 23:41:56 +02:00
starfive pmdomain: starfive: Update prefixes for AON power domain 2023-10-04 23:41:57 +02:00
sunxi pmdomain: sunxi: Move Kconfig option to the pmdomain subsystem 2023-10-04 23:41:56 +02:00
tegra pmdomain: core: constify of_phandle_args in xlate 2024-02-14 10:26:11 +01:00
ti pmdomain: ti-sci: Fix duplicate PD referrals 2024-06-21 14:40:37 +02:00
xilinx pmdomain: core: constify of_phandle_args in xlate 2024-02-14 10:26:11 +01:00
core.c OPP: Fix required_opp_tables for multiple genpds using same table 2024-06-27 13:52:19 +02:00
governor.c PM: domains: Move genpd and its governor to the pmdomain subsystem 2023-12-18 12:49:48 +01:00
Kconfig pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem 2023-11-23 17:32:53 +01:00
Makefile PM: domains: Move genpd and its governor to the pmdomain subsystem 2023-12-18 12:49:48 +01:00