OPP: Extend dev_pm_opp_data with turbo support
authorSibi Sankar <quic_sibis@quicinc.com>
Tue, 27 Feb 2024 17:34:32 +0000 (23:04 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Mon, 11 Mar 2024 05:09:24 +0000 (10:39 +0530)
Let's extend the dev_pm_opp_data with a turbo variable, to allow users to
specify if it's a boost frequency for a dynamically added OPP.

Signed-off-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/opp/core.c
include/linux/pm_opp.h

index c4e0432..e233734 100644 (file)
@@ -2065,6 +2065,7 @@ int _opp_add_v1(struct opp_table *opp_table, struct device *dev,
        /* populate the opp table */
        new_opp->rates[0] = data->freq;
        new_opp->level = data->level;
+       new_opp->turbo = data->turbo;
        tol = u_volt * opp_table->voltage_tolerance_v1 / 100;
        new_opp->supplies[0].u_volt = u_volt;
        new_opp->supplies[0].u_volt_min = u_volt - tol;
index 76dcb7f..fa9b63c 100644 (file)
@@ -87,12 +87,14 @@ struct dev_pm_opp_config {
 
 /**
  * struct dev_pm_opp_data - The data to use to initialize an OPP.
+ * @turbo: Flag to indicate whether the OPP is to be marked turbo or not.
  * @level: The performance level for the OPP. Set level to OPP_LEVEL_UNSET if
  * level field isn't used.
  * @freq: The clock rate in Hz for the OPP.
  * @u_volt: The voltage in uV for the OPP.
  */
 struct dev_pm_opp_data {
+       bool turbo;
        unsigned int level;
        unsigned long freq;
        unsigned long u_volt;