lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [Patch v2 7/9] cpufreq: tegra194: add OPP support and set bandwidth
    On 20-02-23, 19:35, Sumit Gupta wrote:
    > +static int tegra_cpufreq_set_bw(struct cpufreq_policy *policy, unsigned long freq_khz)
    > +{
    > + struct dev_pm_opp *opp;
    > + struct device *dev;
    > + int ret;
    > +
    > + dev = get_cpu_device(policy->cpu);
    > + if (!dev)
    > + return -ENODEV;
    > +
    > + opp = dev_pm_opp_find_freq_exact(dev, freq_khz * KHZ, true);
    > + if (IS_ERR(opp))
    > + return PTR_ERR(opp);
    > +
    > + ret = dev_pm_opp_set_opp(dev, opp);
    > + dev_pm_opp_put(opp);

    What about dev_pm_opp_set_rate() instead ?

    > + return ret;
    > +}

    --
    viresh

    \
     
     \ /
      Last update: 2023-03-27 00:32    [W:2.358 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site