Lines Matching refs:opp_table
26 * The root of the list of all opp-tables. All opp_table structures branch off
27 * from here, with each opp_table containing the list of opps it supports in
40 static bool _find_opp_dev(const struct device *dev, struct opp_table *opp_table)
44 guard(mutex)(&opp_table->lock);
46 list_for_each_entry(opp_dev, &opp_table->dev_list, node)
53 static struct opp_table *_find_opp_table_unlocked(struct device *dev)
55 struct opp_table *opp_table;
57 list_for_each_entry(opp_table, &opp_tables, node) {
58 if (_find_opp_dev(dev, opp_table))
59 return dev_pm_opp_get_opp_table_ref(opp_table);
66 * _find_opp_table() - find opp_table struct using device pointer
71 * Return: pointer to 'struct opp_table' if found, otherwise -ENODEV or
76 struct opp_table *_find_opp_table(struct device *dev)
94 static bool assert_single_clk(struct opp_table *opp_table,
97 return !WARN_ON(opp_table->clk_count > 1);
103 static bool assert_clk_index(struct opp_table *opp_table,
106 return opp_table->clk_count > index;
112 static bool assert_bandwidth_index(struct opp_table *opp_table,
115 return opp_table->path_count > index;
133 if (index >= opp->opp_table->path_count)
183 sizeof(*supplies) * opp->opp_table->regulator_count);
206 for (i = 0; i < opp->opp_table->regulator_count; i++)
224 if (IS_ERR_OR_NULL(opp) || index >= opp->opp_table->clk_count) {
264 index >= opp->opp_table->required_opp_count) {
270 if (lazy_linking_pending(opp->opp_table))
274 if (unlikely(!opp->opp_table->required_opp_tables[index]->is_genpd)) {
312 struct opp_table *opp_table __free(put_opp_table);
314 opp_table = _find_opp_table(dev);
315 if (IS_ERR(opp_table))
318 return opp_table->clock_latency_ns_max;
330 struct opp_table *opp_table __free(put_opp_table);
340 opp_table = _find_opp_table(dev);
341 if (IS_ERR(opp_table))
345 if (!opp_table->regulators)
348 count = opp_table->regulator_count;
354 scoped_guard(mutex, &opp_table->lock) {
359 list_for_each_entry(opp, &opp_table->opp_list, node) {
372 * The caller needs to ensure that opp_table (and hence the regulator)
376 reg = opp_table->regulators[i];
412 struct opp_table *opp_table __free(put_opp_table);
415 opp_table = _find_opp_table(dev);
416 if (IS_ERR(opp_table))
419 if (opp_table->suspend_opp && opp_table->suspend_opp->available)
420 freq = dev_pm_opp_get_freq(opp_table->suspend_opp);
426 int _get_opp_count(struct opp_table *opp_table)
431 guard(mutex)(&opp_table->lock);
433 list_for_each_entry(opp, &opp_table->opp_list, node) {
450 struct opp_table *opp_table __free(put_opp_table);
452 opp_table = _find_opp_table(dev);
453 if (IS_ERR(opp_table)) {
455 __func__, PTR_ERR(opp_table));
456 return PTR_ERR(opp_table);
459 return _get_opp_count(opp_table);
513 static struct dev_pm_opp *_opp_table_find_key(struct opp_table *opp_table,
518 bool (*assert)(struct opp_table *opp_table, unsigned int index))
523 if (assert && !assert(opp_table, index))
526 guard(mutex)(&opp_table->lock);
528 list_for_each_entry(temp_opp, &opp_table->opp_list, node) {
549 bool (*assert)(struct opp_table *opp_table, unsigned int index))
551 struct opp_table *opp_table __free(put_opp_table);
553 opp_table = _find_opp_table(dev);
554 if (IS_ERR(opp_table)) {
556 PTR_ERR(opp_table));
557 return ERR_CAST(opp_table);
560 return _opp_table_find_key(opp_table, key, index, available, read,
567 bool (*assert)(struct opp_table *opp_table, unsigned int index))
577 static struct dev_pm_opp *_opp_table_find_key_ceil(struct opp_table *opp_table,
580 bool (*assert)(struct opp_table *opp_table, unsigned int index))
582 return _opp_table_find_key(opp_table, key, index, available, read,
589 bool (*assert)(struct opp_table *opp_table, unsigned int index))
598 bool (*assert)(struct opp_table *opp_table, unsigned int index))
664 static noinline struct dev_pm_opp *_find_freq_ceil(struct opp_table *opp_table,
667 return _opp_table_find_key_ceil(opp_table, freq, 0, true, _read_freq,
957 _opp_config_clk_single(struct device *dev, struct opp_table *opp_table,
974 ret = clk_set_rate(opp_table->clk, freq);
979 opp_table->current_rate_single_clk = freq;
990 struct opp_table *opp_table, struct dev_pm_opp *opp, void *data,
996 for (i = opp_table->clk_count - 1; i >= 0; i--) {
997 ret = clk_set_rate(opp_table->clks[i], opp->rates[i]);
1005 for (i = 0; i < opp_table->clk_count; i++) {
1006 ret = clk_set_rate(opp_table->clks[i], opp->rates[i]);
1040 if (unlikely(!new_opp->opp_table->enabled)) {
1049 static int _set_opp_bw(const struct opp_table *opp_table,
1055 if (!opp_table->paths)
1058 for (i = 0; i < opp_table->path_count; i++) {
1066 ret = icc_set_bw(opp_table->paths[i], avg, peak);
1099 static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
1102 struct device **devs = opp_table->required_devs;
1110 if (lazy_linking_pending(opp_table))
1116 target = opp_table->required_opp_count;
1119 index = opp_table->required_opp_count - 1;
1139 static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
1144 if (!IS_ERR(opp_table->clk)) {
1145 freq = clk_get_rate(opp_table->clk);
1146 opp = _find_freq_ceil(opp_table, &freq);
1155 guard(mutex)(&opp_table->lock);
1156 opp = dev_pm_opp_get(list_first_entry(&opp_table->opp_list,
1160 opp_table->current_opp = opp;
1163 static int _disable_opp_table(struct device *dev, struct opp_table *opp_table)
1167 if (!opp_table->enabled)
1175 if (!_get_opp_count(opp_table))
1178 ret = _set_opp_bw(opp_table, NULL, dev);
1182 if (opp_table->regulators)
1183 regulator_disable(opp_table->regulators[0]);
1189 ret = _set_required_opps(dev, opp_table, NULL, false);
1192 opp_table->enabled = false;
1196 static int _set_opp(struct device *dev, struct opp_table *opp_table,
1203 return _disable_opp_table(dev, opp_table);
1206 if (unlikely(!opp_table->current_opp))
1207 _find_current_opp(dev, opp_table);
1209 old_opp = opp_table->current_opp;
1212 if (!forced && old_opp == opp && opp_table->enabled) {
1222 scaling_down = _opp_compare_key(opp_table, old_opp, opp);
1228 ret = _set_required_opps(dev, opp_table, opp, true);
1238 ret = _set_opp_bw(opp_table, opp, dev);
1244 if (opp_table->config_regulators) {
1245 ret = opp_table->config_regulators(dev, old_opp, opp,
1246 opp_table->regulators,
1247 opp_table->regulator_count);
1256 if (opp_table->config_clks) {
1257 ret = opp_table->config_clks(dev, opp_table, opp, clk_data, scaling_down);
1264 if (opp_table->config_regulators) {
1265 ret = opp_table->config_regulators(dev, old_opp, opp,
1266 opp_table->regulators,
1267 opp_table->regulator_count);
1275 ret = _set_opp_bw(opp_table, opp, dev);
1285 ret = _set_required_opps(dev, opp_table, opp, false);
1292 opp_table->enabled = true;
1296 opp_table->current_opp = dev_pm_opp_get(opp);
1314 struct opp_table *opp_table __free(put_opp_table);
1319 opp_table = _find_opp_table(dev);
1320 if (IS_ERR(opp_table)) {
1322 return PTR_ERR(opp_table);
1333 if (!_get_opp_count(opp_table)) {
1334 return opp_table->config_clks(dev, opp_table, NULL,
1338 freq = clk_round_rate(opp_table->clk, target_freq);
1348 opp = _find_freq_ceil(opp_table, &temp_freq);
1362 forced = opp_table->current_rate_single_clk != freq;
1365 return _set_opp(dev, opp_table, opp, &freq, forced);
1381 struct opp_table *opp_table __free(put_opp_table);
1383 opp_table = _find_opp_table(dev);
1384 if (IS_ERR(opp_table)) {
1386 return PTR_ERR(opp_table);
1389 return _set_opp(dev, opp_table, opp, NULL, false);
1395 struct opp_table *opp_table)
1397 opp_debug_unregister(opp_dev, opp_table);
1403 struct opp_table *opp_table)
1414 scoped_guard(mutex, &opp_table->lock)
1415 list_add(&opp_dev->node, &opp_table->dev_list);
1417 /* Create debugfs entries for the opp_table */
1418 opp_debug_register(opp_dev, opp_table);
1423 static struct opp_table *_allocate_opp_table(struct device *dev, int index)
1425 struct opp_table *opp_table;
1433 opp_table = kzalloc(sizeof(*opp_table), GFP_KERNEL);
1434 if (!opp_table)
1437 mutex_init(&opp_table->lock);
1438 INIT_LIST_HEAD(&opp_table->dev_list);
1439 INIT_LIST_HEAD(&opp_table->lazy);
1441 opp_table->clk = ERR_PTR(-ENODEV);
1444 opp_table->regulator_count = -1;
1446 opp_dev = _add_opp_dev(dev, opp_table);
1452 _of_init_opp_table(opp_table, dev, index);
1455 ret = dev_pm_opp_of_find_icc_paths(dev, opp_table);
1464 BLOCKING_INIT_NOTIFIER_HEAD(&opp_table->head);
1465 INIT_LIST_HEAD(&opp_table->opp_list);
1466 kref_init(&opp_table->kref);
1468 return opp_table;
1471 _of_clear_opp_table(opp_table);
1472 _remove_opp_dev(opp_dev, opp_table);
1473 mutex_destroy(&opp_table->lock);
1475 kfree(opp_table);
1479 static struct opp_table *_update_opp_table_clk(struct device *dev,
1480 struct opp_table *opp_table,
1489 if (!getclk || IS_ERR(opp_table) || !IS_ERR(opp_table->clk) ||
1490 opp_table->clks)
1491 return opp_table;
1494 opp_table->clk = clk_get(dev, NULL);
1496 ret = PTR_ERR_OR_ZERO(opp_table->clk);
1498 opp_table->config_clks = _opp_config_clk_single;
1499 opp_table->clk_count = 1;
1500 return opp_table;
1516 opp_table->clk_count = 1;
1519 return opp_table;
1522 dev_pm_opp_put_opp_table(opp_table);
1543 struct opp_table *_add_opp_table_indexed(struct device *dev, int index,
1546 struct opp_table *opp_table;
1551 opp_table = _find_opp_table_unlocked(dev);
1552 if (!IS_ERR(opp_table))
1566 opp_table = _managed_opp(dev, index);
1571 if (opp_table) {
1572 if (!_add_opp_dev(dev, opp_table)) {
1573 dev_pm_opp_put_opp_table(opp_table);
1574 opp_table = ERR_PTR(-ENOMEM);
1579 opp_table = _allocate_opp_table(dev, index);
1582 if (!IS_ERR(opp_table))
1583 list_add(&opp_table->node, &opp_tables);
1591 return _update_opp_table_clk(dev, opp_table, getclk);
1594 static struct opp_table *_add_opp_table(struct device *dev, bool getclk)
1599 struct opp_table *dev_pm_opp_get_opp_table(struct device *dev)
1607 struct opp_table *opp_table = container_of(kref, struct opp_table, kref);
1612 list_del(&opp_table->node);
1615 if (opp_table->current_opp)
1616 dev_pm_opp_put(opp_table->current_opp);
1618 _of_clear_opp_table(opp_table);
1621 if (!IS_ERR(opp_table->clk))
1622 clk_put(opp_table->clk);
1624 if (opp_table->paths) {
1625 for (i = 0; i < opp_table->path_count; i++)
1626 icc_put(opp_table->paths[i]);
1627 kfree(opp_table->paths);
1630 WARN_ON(!list_empty(&opp_table->opp_list));
1632 list_for_each_entry_safe(opp_dev, temp, &opp_table->dev_list, node)
1633 _remove_opp_dev(opp_dev, opp_table);
1635 mutex_destroy(&opp_table->lock);
1636 kfree(opp_table);
1639 struct opp_table *dev_pm_opp_get_opp_table_ref(struct opp_table *opp_table)
1641 kref_get(&opp_table->kref);
1642 return opp_table;
1646 void dev_pm_opp_put_opp_table(struct opp_table *opp_table)
1648 kref_put_mutex(&opp_table->kref, _opp_table_kref_release,
1661 struct opp_table *opp_table = opp->opp_table;
1664 mutex_unlock(&opp_table->lock);
1670 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_REMOVE, opp);
1671 _of_clear_opp(opp_table, opp);
1685 kref_put_mutex(&opp->kref, _opp_kref_release, &opp->opp_table->lock);
1698 struct opp_table *opp_table __free(put_opp_table);
1701 opp_table = _find_opp_table(dev);
1702 if (IS_ERR(opp_table))
1705 if (!assert_single_clk(opp_table, 0))
1708 scoped_guard(mutex, &opp_table->lock) {
1709 list_for_each_entry(iter, &opp_table->opp_list, node) {
1721 dev_pm_opp_put_opp_table(opp_table);
1729 static struct dev_pm_opp *_opp_get_next(struct opp_table *opp_table,
1734 guard(mutex)(&opp_table->lock);
1736 list_for_each_entry(opp, &opp_table->opp_list, node) {
1751 * called without the opp_table->lock held.
1753 static void _opp_remove_all(struct opp_table *opp_table, bool dynamic)
1757 while ((opp = _opp_get_next(opp_table, dynamic))) {
1763 dev_pm_opp_put_opp_table(opp_table);
1767 bool _opp_remove_all_static(struct opp_table *opp_table)
1769 scoped_guard(mutex, &opp_table->lock) {
1770 if (!opp_table->parsed_static_opps)
1773 if (--opp_table->parsed_static_opps)
1777 _opp_remove_all(opp_table, false);
1789 struct opp_table *opp_table __free(put_opp_table);
1791 opp_table = _find_opp_table(dev);
1792 if (IS_ERR(opp_table))
1795 _opp_remove_all(opp_table, true);
1799 struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table)
1805 supply_count = opp_table->regulator_count > 0 ?
1806 opp_table->regulator_count : 1;
1808 clk_size = sizeof(*opp->rates) * opp_table->clk_count;
1809 icc_size = sizeof(*opp->bandwidth) * opp_table->path_count;
1822 opp->bandwidth = (struct dev_pm_opp_icc_bw *)(opp->rates + opp_table->clk_count);
1832 struct opp_table *opp_table)
1837 if (!opp_table->regulators)
1840 for (i = 0; i < opp_table->regulator_count; i++) {
1841 reg = opp_table->regulators[i];
1856 static int _opp_compare_rate(struct opp_table *opp_table,
1861 for (i = 0; i < opp_table->clk_count; i++) {
1870 static int _opp_compare_bw(struct opp_table *opp_table, struct dev_pm_opp *opp1,
1875 for (i = 0; i < opp_table->path_count; i++) {
1890 int _opp_compare_key(struct opp_table *opp_table, struct dev_pm_opp *opp1,
1895 ret = _opp_compare_rate(opp_table, opp1, opp2);
1899 ret = _opp_compare_bw(opp_table, opp1, opp2);
1911 struct opp_table *opp_table,
1921 * Need to use &opp_table->opp_list in the condition part of the 'for'
1925 list_for_each_entry(opp, &opp_table->opp_list, node) {
1926 opp_cmp = _opp_compare_key(opp_table, new_opp, opp);
1975 struct opp_table *opp_table)
1980 scoped_guard(mutex, &opp_table->lock) {
1981 head = &opp_table->opp_list;
1983 ret = _opp_is_duplicate(dev, new_opp, opp_table, &head);
1990 new_opp->opp_table = opp_table;
1993 opp_debug_create_one(new_opp, opp_table);
1995 if (!_opp_supported_by_regulators(new_opp, opp_table)) {
2002 if (lazy_linking_pending(opp_table))
2005 _required_opps_available(new_opp, opp_table->required_opp_count);
2012 * @opp_table: OPP table
2031 int _opp_add_v1(struct opp_table *opp_table, struct device *dev,
2038 if (!assert_single_clk(opp_table, 0))
2041 new_opp = _opp_allocate(opp_table);
2049 tol = u_volt * opp_table->voltage_tolerance_v1 / 100;
2056 ret = _opp_add(dev, new_opp, opp_table);
2068 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ADD, new_opp);
2083 static int _opp_set_supported_hw(struct opp_table *opp_table,
2087 if (opp_table->supported_hw)
2090 opp_table->supported_hw = kmemdup_array(versions, count,
2092 if (!opp_table->supported_hw)
2095 opp_table->supported_hw_count = count;
2100 static void _opp_put_supported_hw(struct opp_table *opp_table)
2102 if (opp_table->supported_hw) {
2103 kfree(opp_table->supported_hw);
2104 opp_table->supported_hw = NULL;
2105 opp_table->supported_hw_count = 0;
2115 static int _opp_set_prop_name(struct opp_table *opp_table, const char *name)
2118 if (!opp_table->prop_name) {
2119 opp_table->prop_name = kstrdup(name, GFP_KERNEL);
2120 if (!opp_table->prop_name)
2127 static void _opp_put_prop_name(struct opp_table *opp_table)
2129 if (opp_table->prop_name) {
2130 kfree(opp_table->prop_name);
2131 opp_table->prop_name = NULL;
2142 static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
2157 if (opp_table->regulators)
2160 opp_table->regulators = kmalloc_array(count,
2161 sizeof(*opp_table->regulators),
2163 if (!opp_table->regulators)
2175 opp_table->regulators[i] = reg;
2178 opp_table->regulator_count = count;
2182 opp_table->config_regulators = _opp_config_regulator_single;
2188 regulator_put(opp_table->regulators[--i]);
2190 kfree(opp_table->regulators);
2191 opp_table->regulators = NULL;
2192 opp_table->regulator_count = -1;
2197 static void _opp_put_regulators(struct opp_table *opp_table)
2201 if (!opp_table->regulators)
2204 if (opp_table->enabled) {
2205 for (i = opp_table->regulator_count - 1; i >= 0; i--)
2206 regulator_disable(opp_table->regulators[i]);
2209 for (i = opp_table->regulator_count - 1; i >= 0; i--)
2210 regulator_put(opp_table->regulators[i]);
2212 kfree(opp_table->regulators);
2213 opp_table->regulators = NULL;
2214 opp_table->regulator_count = -1;
2217 static void _put_clks(struct opp_table *opp_table, int count)
2222 clk_put(opp_table->clks[i]);
2224 kfree(opp_table->clks);
2225 opp_table->clks = NULL;
2237 static int _opp_set_clknames(struct opp_table *opp_table, struct device *dev,
2261 if (opp_table->clks)
2264 opp_table->clks = kmalloc_array(count, sizeof(*opp_table->clks),
2266 if (!opp_table->clks)
2279 opp_table->clks[i] = clk;
2282 opp_table->clk_count = count;
2283 opp_table->config_clks = config_clks;
2287 if (!opp_table->config_clks)
2288 opp_table->config_clks = _opp_config_clk_single;
2302 opp_table->clk = opp_table->clks[0];
2308 _put_clks(opp_table, i);
2312 static void _opp_put_clknames(struct opp_table *opp_table)
2314 if (!opp_table->clks)
2317 opp_table->config_clks = NULL;
2318 opp_table->clk = ERR_PTR(-ENODEV);
2320 _put_clks(opp_table, opp_table->clk_count);
2328 static int _opp_set_config_regulators_helper(struct opp_table *opp_table,
2332 if (!opp_table->config_regulators)
2333 opp_table->config_regulators = config_regulators;
2338 static void _opp_put_config_regulators_helper(struct opp_table *opp_table)
2340 if (opp_table->config_regulators)
2341 opp_table->config_regulators = NULL;
2344 static int _opp_set_required_dev(struct opp_table *opp_table,
2349 struct opp_table *required_table, *pd_table;
2353 if (opp_table->is_genpd) {
2358 if (index >= opp_table->required_opp_count) {
2363 required_table = opp_table->required_opp_tables[index];
2376 * create separate instances of 'struct opp_table' from it, then it is
2390 opp_table->required_opp_tables[index] = pd_table;
2396 opp_table->required_devs[index] = required_dev;
2400 static void _opp_put_required_dev(struct opp_table *opp_table,
2403 opp_table->required_devs[index] = NULL;
2409 _opp_put_required_dev(data->opp_table,
2412 _opp_put_regulators(data->opp_table);
2414 _opp_put_supported_hw(data->opp_table);
2416 _opp_put_config_regulators_helper(data->opp_table);
2418 _opp_put_prop_name(data->opp_table);
2420 _opp_put_clknames(data->opp_table);
2422 dev_pm_opp_put_opp_table(data->opp_table);
2445 struct opp_table *opp_table;
2454 opp_table = _add_opp_table(dev, false);
2455 if (IS_ERR(opp_table)) {
2457 return PTR_ERR(opp_table);
2460 data->opp_table = opp_table;
2464 if (WARN_ON(!list_empty(&opp_table->opp_list))) {
2471 ret = _opp_set_clknames(opp_table, dev, config->clk_names,
2485 ret = _opp_set_prop_name(opp_table, config->prop_name);
2494 ret = _opp_set_config_regulators_helper(opp_table, dev,
2504 ret = _opp_set_supported_hw(opp_table, config->supported_hw,
2514 ret = _opp_set_regulators(opp_table, dev,
2523 ret = _opp_set_required_dev(opp_table, dev,
2619 struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
2620 struct opp_table *dst_table,
2671 int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
2672 struct opp_table *dst_table,
2740 struct opp_table *opp_table;
2743 opp_table = _add_opp_table(dev, true);
2744 if (IS_ERR(opp_table))
2745 return PTR_ERR(opp_table);
2748 opp_table->regulator_count = 1;
2750 ret = _opp_add_v1(opp_table, dev, data, true);
2752 dev_pm_opp_put_opp_table(opp_table);
2775 struct opp_table *opp_table __free(put_opp_table);
2777 /* Find the opp_table */
2778 opp_table = _find_opp_table(dev);
2779 if (IS_ERR(opp_table)) {
2781 PTR_ERR(opp_table));
2782 return PTR_ERR(opp_table);
2785 if (!assert_single_clk(opp_table, 0))
2788 scoped_guard(mutex, &opp_table->lock) {
2790 list_for_each_entry(tmp_opp, &opp_table->opp_list, node) {
2809 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ENABLE,
2812 blocking_notifier_call_chain(&opp_table->head,
2836 struct opp_table *opp_table __free(put_opp_table);
2839 /* Find the opp_table */
2840 opp_table = _find_opp_table(dev);
2841 if (IS_ERR(opp_table)) {
2842 r = PTR_ERR(opp_table);
2847 if (!assert_single_clk(opp_table, 0))
2850 scoped_guard(mutex, &opp_table->lock) {
2852 list_for_each_entry(tmp_opp, &opp_table->opp_list, node) {
2873 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ADJUST_VOLTAGE,
2890 struct opp_table *opp_table __free(put_opp_table);
2895 opp_table = _find_opp_table(dev);
2896 if (IS_ERR(opp_table))
2900 if (unlikely(!opp_table->regulators))
2904 if (!opp_table->enabled)
2907 for (i = 0; i < opp_table->regulator_count; i++) {
2908 reg = opp_table->regulators[i];
2966 struct opp_table *opp_table __free(put_opp_table);
2968 opp_table = _find_opp_table(dev);
2969 if (IS_ERR(opp_table))
2970 return PTR_ERR(opp_table);
2972 return blocking_notifier_chain_register(&opp_table->head, nb);
2986 struct opp_table *opp_table __free(put_opp_table);
2988 opp_table = _find_opp_table(dev);
2989 if (IS_ERR(opp_table))
2990 return PTR_ERR(opp_table);
2992 return blocking_notifier_chain_unregister(&opp_table->head, nb);
3005 struct opp_table *opp_table __free(put_opp_table);
3008 opp_table = _find_opp_table(dev);
3009 if (IS_ERR(opp_table)) {
3010 int error = PTR_ERR(opp_table);
3013 WARN(1, "%s: opp_table: %d\n",
3024 if (_opp_remove_all_static(opp_table))
3025 dev_pm_opp_put_opp_table(opp_table);