opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 1 Sep 2020 09:37:09 +0000 (15:07 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 16 Sep 2020 08:26:08 +0000 (13:56 +0530)
commit90d46d71cce279d878793a0ed4b326b4027aca6c
treebb6a73e22b45007e0b3ce63e825cef38e822b950
parentdd461cd9183fe80bee84fd6cab2a29bfc8f55a76
opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()

Until now for V1 OPP bindings we used to call
dev_pm_opp_of_cpumask_add_table() first and then
dev_pm_opp_set_sharing_cpus() in the cpufreq-dt driver.

A later patch will though update the cpufreq-dt driver to optimize the
code a bit and we will call dev_pm_opp_set_sharing_cpus() first followed
by dev_pm_opp_of_cpumask_add_table(), which doesn't work well today as
it tries to re parse the OPP entries. This should work nevertheless for
V1 bindings as the same works for V2 bindings.

Adapt the same approach from V2 bindings and fix this.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/of.c