Lines Matching +full:required +full:- +full:opps
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2009-2014 Texas Instruments Incorporated.
25 * dev_pm_opp_init_cpufreq_table() - create a cpufreq table for a device
29 * Generate a cpufreq table for a provided device- this assumes that the
32 * This function allocates required memory for the cpufreq table. It is
33 * expected that the caller does the required maintenance such as freeing
34 * the table as required.
36 * Returns -EINVAL for bad pointers, -ENODEV if the device is not found, -ENOMEM
53 return max_opps ? max_opps : -ENODATA; in dev_pm_opp_init_cpufreq_table()
57 return -ENOMEM; in dev_pm_opp_init_cpufreq_table()
90 * dev_pm_opp_free_cpufreq_table() - free the cpufreq table
132 * dev_pm_opp_cpumask_remove_table() - Removes OPP table for @cpumask
136 * This should be used to remove all the OPPs entries associated with
141 _dev_pm_opp_cpumask_remove_table(cpumask, -1); in dev_pm_opp_cpumask_remove_table()
146 * dev_pm_opp_set_sharing_cpus() - Mark OPP table as shared by few CPUs
153 * Returns -ENODEV if OPP table isn't already present.
168 if (cpu == cpu_dev->id) in dev_pm_opp_set_sharing_cpus()
180 dev_err(dev, "%s: failed to add opp-dev for cpu%d device\n", in dev_pm_opp_set_sharing_cpus()
185 /* Mark opp-table as multiple CPUs are sharing it now */ in dev_pm_opp_set_sharing_cpus()
186 opp_table->shared_opp = OPP_TABLE_ACCESS_SHARED; in dev_pm_opp_set_sharing_cpus()
196 * dev_pm_opp_get_sharing_cpus() - Get cpumask of CPUs sharing OPPs with @cpu_dev
200 * This updates the @cpumask with CPUs that are sharing OPPs with @cpu_dev.
202 * Returns -ENODEV if OPP table isn't already present and -EINVAL if the OPP
203 * table's status is access-unknown.
215 if (opp_table->shared_opp == OPP_TABLE_ACCESS_UNKNOWN) { in dev_pm_opp_get_sharing_cpus()
216 ret = -EINVAL; in dev_pm_opp_get_sharing_cpus()
222 if (opp_table->shared_opp == OPP_TABLE_ACCESS_SHARED) { in dev_pm_opp_get_sharing_cpus()
223 mutex_lock(&opp_table->lock); in dev_pm_opp_get_sharing_cpus()
224 list_for_each_entry(opp_dev, &opp_table->dev_list, node) in dev_pm_opp_get_sharing_cpus()
225 cpumask_set_cpu(opp_dev->dev->id, cpumask); in dev_pm_opp_get_sharing_cpus()
226 mutex_unlock(&opp_table->lock); in dev_pm_opp_get_sharing_cpus()
228 cpumask_set_cpu(cpu_dev->id, cpumask); in dev_pm_opp_get_sharing_cpus()