OPP: Allow multiple clocks for a device
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 10 Jun 2022 06:32:04 +0000 (12:02 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 12 Jul 2022 15:05:20 +0000 (20:35 +0530)
commit2083da24eb56ce622332946800a67a7449d85fe5
tree5e66680874d4ddaa82f9bda53a8ef2bc5f243c13
parent3cb16ad69bef90a86390d7f94081fd5ae9e0df8d
OPP: Allow multiple clocks for a device

This patch adds support to allow multiple clocks for a device.

The design is pretty much similar to how this is done for regulators,
and platforms can supply their own version of the config_clks() callback
if they have multiple clocks for their device. The core manages the
calls via opp_table->config_clks() eventually.

We have kept both "clk" and "clks" fields in the OPP table structure and
the reason is provided as a comment in _opp_set_clknames(). The same
isn't done for "rates" though and we use rates[0] at most of the places
now.

Co-developed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
drivers/opp/debugfs.c
drivers/opp/of.c
drivers/opp/opp.h
include/linux/pm_opp.h