linux-stable/drivers/opp
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
..
core.c OPP: Fix required_opp_tables for multiple genpds using same table 2024-06-27 13:52:19 +02:00
cpu.c OPP: Fix argument name in doc comment 2023-08-18 10:55:49 +05:30
debugfs.c OPP: debugfs: Fix warning around icc_get_name() 2024-03-11 10:39:24 +05:30
Kconfig drivers/opp: Remove "select SRCU" 2023-01-05 11:47:21 +05:30
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
of.c OPP: Don't set OPP recursively for a parent genpd 2023-11-28 16:03:25 +05:30
opp.h OPP: Rename 'rate_clk_single' 2024-01-05 15:55:41 +05:30
ti-opp-supply.c opp: ti: Use device_get_match_data() 2023-11-23 11:28:46 +05:30