lkml.org 
[lkml]   [2023]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/9] OPP: Extend dev_pm_opp_data with a level
    Date
    Let's extend the dev_pm_opp_data with a level variable, to allow users to
    specify a corresponding level (performance state) for a dynamically added
    OPP.

    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    ---
    drivers/opp/core.c | 1 +
    include/linux/pm_opp.h | 2 ++
    2 files changed, 3 insertions(+)

    diff --git a/drivers/opp/core.c b/drivers/opp/core.c
    index 54b6138e1189..ca8d1304b508 100644
    --- a/drivers/opp/core.c
    +++ b/drivers/opp/core.c
    @@ -2035,6 +2035,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;
    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;
    diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
    index a8ee93ba41d8..9ad168f4cbf1 100644
    --- a/include/linux/pm_opp.h
    +++ b/include/linux/pm_opp.h
    @@ -94,10 +94,12 @@ struct dev_pm_opp_config {

    /**
    * struct dev_pm_opp_data - The data to use to initialize an OPP.
    + * @level: The performance level for the OPP.
    * @freq: The clock rate in Hz for the OPP.
    * @u_volt: The voltage in uV for the OPP.
    */
    struct dev_pm_opp_data {
    + unsigned int level;
    unsigned long freq;
    unsigned long u_volt;
    };
    --
    2.34.1
    \
     
     \ /
      Last update: 2023-09-25 15:19    [W:7.464 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site