Lines Matching full: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) =
315 if (IS_ERR(opp_table))
318 return opp_table->clock_latency_ns_max;
339 struct opp_table *opp_table __free(put_opp_table) =
342 if (IS_ERR(opp_table))
346 if (!opp_table->regulators)
349 count = opp_table->regulator_count;
355 scoped_guard(mutex, &opp_table->lock) {
360 list_for_each_entry(opp, &opp_table->opp_list, node) {
373 * The caller needs to ensure that opp_table (and hence the regulator)
377 reg = opp_table->regulators[i];
415 struct opp_table *opp_table __free(put_opp_table) =
418 if (IS_ERR(opp_table))
421 if (opp_table->suspend_opp && opp_table->suspend_opp->available)
422 freq = dev_pm_opp_get_freq(opp_table->suspend_opp);
428 int _get_opp_count(struct opp_table *opp_table)
433 guard(mutex)(&opp_table->lock);
435 list_for_each_entry(opp, &opp_table->opp_list, node) {
452 struct opp_table *opp_table __free(put_opp_table) =
455 if (IS_ERR(opp_table)) {
457 __func__, opp_table);
458 return PTR_ERR(opp_table);
461 return _get_opp_count(opp_table);
541 static struct dev_pm_opp *_opp_table_find_key(struct opp_table *opp_table,
546 bool (*assert)(struct opp_table *opp_table, unsigned int index))
551 if (assert && !assert(opp_table, index))
554 guard(mutex)(&opp_table->lock);
556 list_for_each_entry(temp_opp, &opp_table->opp_list, node) {
572 static struct dev_pm_opp *_opp_table_find_opp_key(struct opp_table *opp_table,
578 bool (*assert)(struct opp_table *opp_table, unsigned int index))
584 if (!assert(opp_table, 0))
587 guard(mutex)(&opp_table->lock);
589 list_for_each_entry(temp_opp, &opp_table->opp_list, node) {
608 bool (*assert)(struct opp_table *opp_table, unsigned int index))
610 struct opp_table *opp_table __free(put_opp_table) =
613 if (IS_ERR(opp_table)) {
615 opp_table);
616 return ERR_CAST(opp_table);
619 return _opp_table_find_key(opp_table, key, index, available, read,
626 bool (*assert)(struct opp_table *opp_table, unsigned int index))
636 static struct dev_pm_opp *_opp_table_find_key_ceil(struct opp_table *opp_table,
639 bool (*assert)(struct opp_table *opp_table, unsigned int index))
641 return _opp_table_find_key(opp_table, key, index, available, read,
648 bool (*assert)(struct opp_table *opp_table, unsigned int index))
657 bool (*assert)(struct opp_table *opp_table, unsigned int index))
722 struct opp_table *opp_table __free(put_opp_table) = _find_opp_table(dev);
724 if (IS_ERR(opp_table)) {
726 opp_table);
727 return ERR_CAST(opp_table);
730 return _opp_table_find_opp_key(opp_table, key, available,
765 static noinline struct dev_pm_opp *_find_freq_ceil(struct opp_table *opp_table,
768 return _opp_table_find_key_ceil(opp_table, freq, 0, true, _read_freq,
1058 _opp_config_clk_single(struct device *dev, struct opp_table *opp_table,
1075 ret = clk_set_rate(opp_table->clk, freq);
1080 opp_table->current_rate_single_clk = freq;
1091 struct opp_table *opp_table, struct dev_pm_opp *opp, void *data,
1097 for (i = opp_table->clk_count - 1; i >= 0; i--) {
1098 ret = clk_set_rate(opp_table->clks[i], opp->rates[i]);
1106 for (i = 0; i < opp_table->clk_count; i++) {
1107 ret = clk_set_rate(opp_table->clks[i], opp->rates[i]);
1141 if (unlikely(!new_opp->opp_table->enabled)) {
1150 static int _set_opp_bw(const struct opp_table *opp_table,
1156 if (!opp_table->paths)
1159 for (i = 0; i < opp_table->path_count; i++) {
1167 ret = icc_set_bw(opp_table->paths[i], avg, peak);
1200 static int _set_required_opps(struct device *dev, struct opp_table *opp_table,
1203 struct device **devs = opp_table->required_devs;
1211 if (lazy_linking_pending(opp_table))
1217 target = opp_table->required_opp_count;
1220 index = opp_table->required_opp_count - 1;
1240 static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
1245 if (!IS_ERR(opp_table->clk)) {
1246 freq = clk_get_rate(opp_table->clk);
1247 opp = _find_freq_ceil(opp_table, &freq);
1256 guard(mutex)(&opp_table->lock);
1257 opp = dev_pm_opp_get(list_first_entry(&opp_table->opp_list,
1261 opp_table->current_opp = opp;
1264 static int _disable_opp_table(struct device *dev, struct opp_table *opp_table)
1268 if (!opp_table->enabled)
1276 if (!_get_opp_count(opp_table))
1279 ret = _set_opp_bw(opp_table, NULL, dev);
1283 if (opp_table->regulators)
1284 regulator_disable(opp_table->regulators[0]);
1290 ret = _set_required_opps(dev, opp_table, NULL, false);
1293 opp_table->enabled = false;
1297 static int _set_opp(struct device *dev, struct opp_table *opp_table,
1304 return _disable_opp_table(dev, opp_table);
1307 if (unlikely(!opp_table->current_opp))
1308 _find_current_opp(dev, opp_table);
1310 old_opp = opp_table->current_opp;
1313 if (!forced && old_opp == opp && opp_table->enabled) {
1323 scaling_down = _opp_compare_key(opp_table, old_opp, opp);
1329 ret = _set_required_opps(dev, opp_table, opp, true);
1339 ret = _set_opp_bw(opp_table, opp, dev);
1345 if (opp_table->config_regulators) {
1346 ret = opp_table->config_regulators(dev, old_opp, opp,
1347 opp_table->regulators,
1348 opp_table->regulator_count);
1357 if (opp_table->config_clks) {
1358 ret = opp_table->config_clks(dev, opp_table, opp, clk_data, scaling_down);
1365 if (opp_table->config_regulators) {
1366 ret = opp_table->config_regulators(dev, old_opp, opp,
1367 opp_table->regulators,
1368 opp_table->regulator_count);
1376 ret = _set_opp_bw(opp_table, opp, dev);
1386 ret = _set_required_opps(dev, opp_table, opp, false);
1393 opp_table->enabled = true;
1397 opp_table->current_opp = dev_pm_opp_get(opp);
1415 struct opp_table *opp_table __free(put_opp_table) =
1421 if (IS_ERR(opp_table)) {
1423 return PTR_ERR(opp_table);
1434 if (!_get_opp_count(opp_table)) {
1435 return opp_table->config_clks(dev, opp_table, NULL,
1439 freq = clk_round_rate(opp_table->clk, target_freq);
1449 opp = _find_freq_ceil(opp_table, &temp_freq);
1463 forced = opp_table->current_rate_single_clk != freq;
1466 return _set_opp(dev, opp_table, opp, &freq, forced);
1482 struct opp_table *opp_table __free(put_opp_table) =
1485 if (IS_ERR(opp_table)) {
1487 return PTR_ERR(opp_table);
1490 return _set_opp(dev, opp_table, opp, NULL, false);
1496 struct opp_table *opp_table)
1498 opp_debug_unregister(opp_dev, opp_table);
1504 struct opp_table *opp_table)
1515 scoped_guard(mutex, &opp_table->lock)
1516 list_add(&opp_dev->node, &opp_table->dev_list);
1518 /* Create debugfs entries for the opp_table */
1519 opp_debug_register(opp_dev, opp_table);
1524 static struct opp_table *_allocate_opp_table(struct device *dev, int index)
1526 struct opp_table *opp_table;
1534 opp_table = kzalloc_obj(*opp_table);
1535 if (!opp_table)
1538 mutex_init(&opp_table->lock);
1539 INIT_LIST_HEAD(&opp_table->dev_list);
1540 INIT_LIST_HEAD(&opp_table->lazy);
1542 opp_table->clk = ERR_PTR(-ENODEV);
1545 opp_table->regulator_count = -1;
1547 opp_dev = _add_opp_dev(dev, opp_table);
1553 _of_init_opp_table(opp_table, dev, index);
1556 ret = dev_pm_opp_of_find_icc_paths(dev, opp_table);
1565 BLOCKING_INIT_NOTIFIER_HEAD(&opp_table->head);
1566 INIT_LIST_HEAD(&opp_table->opp_list);
1567 kref_init(&opp_table->kref);
1569 return opp_table;
1572 _of_clear_opp_table(opp_table);
1573 _remove_opp_dev(opp_dev, opp_table);
1574 mutex_destroy(&opp_table->lock);
1576 kfree(opp_table);
1580 static struct opp_table *_update_opp_table_clk(struct device *dev,
1581 struct opp_table *opp_table,
1590 if (!getclk || IS_ERR(opp_table) || !IS_ERR(opp_table->clk) ||
1591 opp_table->clks)
1592 return opp_table;
1605 * clk_get_optional() instead of clk_get() so opp_table->clk stays
1609 opp_table->clk = clk_get_optional(dev, NULL);
1611 if (IS_ERR(opp_table->clk)) {
1612 ret = dev_err_probe(dev, PTR_ERR(opp_table->clk), "Couldn't find clock\n");
1613 dev_pm_opp_put_opp_table(opp_table);
1617 if (opp_table->clk)
1618 opp_table->config_clks = _opp_config_clk_single;
1620 opp_table->clk_count = 1;
1622 return opp_table;
1640 struct opp_table *_add_opp_table_indexed(struct device *dev, int index,
1643 struct opp_table *opp_table;
1648 opp_table = _find_opp_table_unlocked(dev);
1649 if (!IS_ERR(opp_table))
1663 opp_table = _managed_opp(dev, index);
1668 if (opp_table) {
1669 if (!_add_opp_dev(dev, opp_table)) {
1670 dev_pm_opp_put_opp_table(opp_table);
1671 opp_table = ERR_PTR(-ENOMEM);
1676 opp_table = _allocate_opp_table(dev, index);
1679 if (!IS_ERR(opp_table))
1680 list_add(&opp_table->node, &opp_tables);
1688 return _update_opp_table_clk(dev, opp_table, getclk);
1691 static struct opp_table *_add_opp_table(struct device *dev, bool getclk)
1696 struct opp_table *dev_pm_opp_get_opp_table(struct device *dev)
1704 struct opp_table *opp_table = container_of(kref, struct opp_table, kref);
1709 list_del(&opp_table->node);
1712 if (opp_table->current_opp)
1713 dev_pm_opp_put(opp_table->current_opp);
1715 _of_clear_opp_table(opp_table);
1718 if (!IS_ERR(opp_table->clk))
1719 clk_put(opp_table->clk);
1721 if (opp_table->paths) {
1722 for (i = 0; i < opp_table->path_count; i++)
1723 icc_put(opp_table->paths[i]);
1724 kfree(opp_table->paths);
1727 WARN_ON(!list_empty(&opp_table->opp_list));
1729 list_for_each_entry_safe(opp_dev, temp, &opp_table->dev_list, node)
1730 _remove_opp_dev(opp_dev, opp_table);
1732 mutex_destroy(&opp_table->lock);
1733 kfree(opp_table);
1736 struct opp_table *dev_pm_opp_get_opp_table_ref(struct opp_table *opp_table)
1738 kref_get(&opp_table->kref);
1739 return opp_table;
1743 void dev_pm_opp_put_opp_table(struct opp_table *opp_table)
1745 kref_put_mutex(&opp_table->kref, _opp_table_kref_release,
1758 struct opp_table *opp_table = opp->opp_table;
1761 mutex_unlock(&opp_table->lock);
1767 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_REMOVE, opp);
1768 _of_clear_opp(opp_table, opp);
1782 kref_put_mutex(&opp->kref, _opp_kref_release, &opp->opp_table->lock);
1797 struct opp_table *opp_table __free(put_opp_table) =
1800 if (IS_ERR(opp_table))
1803 if (!assert_single_clk(opp_table, 0))
1806 scoped_guard(mutex, &opp_table->lock) {
1807 list_for_each_entry(iter, &opp_table->opp_list, node) {
1819 dev_pm_opp_put_opp_table(opp_table);
1827 static struct dev_pm_opp *_opp_get_next(struct opp_table *opp_table,
1832 guard(mutex)(&opp_table->lock);
1834 list_for_each_entry(opp, &opp_table->opp_list, node) {
1849 * called without the opp_table->lock held.
1851 static void _opp_remove_all(struct opp_table *opp_table, bool dynamic)
1855 while ((opp = _opp_get_next(opp_table, dynamic))) {
1861 dev_pm_opp_put_opp_table(opp_table);
1865 bool _opp_remove_all_static(struct opp_table *opp_table)
1867 scoped_guard(mutex, &opp_table->lock) {
1868 if (!opp_table->parsed_static_opps)
1871 if (--opp_table->parsed_static_opps)
1875 _opp_remove_all(opp_table, false);
1887 struct opp_table *opp_table __free(put_opp_table) =
1890 if (IS_ERR(opp_table))
1893 _opp_remove_all(opp_table, true);
1897 struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table)
1903 supply_count = opp_table->regulator_count > 0 ?
1904 opp_table->regulator_count : 1;
1906 clk_size = sizeof(*opp->rates) * opp_table->clk_count;
1907 icc_size = sizeof(*opp->bandwidth) * opp_table->path_count;
1920 opp->bandwidth = (struct dev_pm_opp_icc_bw *)(opp->rates + opp_table->clk_count);
1930 struct opp_table *opp_table)
1935 if (!opp_table->regulators)
1938 for (i = 0; i < opp_table->regulator_count; i++) {
1939 reg = opp_table->regulators[i];
1954 static int _opp_compare_rate(struct opp_table *opp_table,
1959 for (i = 0; i < opp_table->clk_count; i++) {
1968 static int _opp_compare_bw(struct opp_table *opp_table, struct dev_pm_opp *opp1,
1973 for (i = 0; i < opp_table->path_count; i++) {
1988 int _opp_compare_key(struct opp_table *opp_table, struct dev_pm_opp *opp1,
1993 ret = _opp_compare_rate(opp_table, opp1, opp2);
1997 ret = _opp_compare_bw(opp_table, opp1, opp2);
2009 struct opp_table *opp_table,
2019 * Need to use &opp_table->opp_list in the condition part of the 'for'
2023 list_for_each_entry(opp, &opp_table->opp_list, node) {
2024 opp_cmp = _opp_compare_key(opp_table, new_opp, opp);
2073 struct opp_table *opp_table)
2078 scoped_guard(mutex, &opp_table->lock) {
2079 head = &opp_table->opp_list;
2081 ret = _opp_is_duplicate(dev, new_opp, opp_table, &head);
2086 new_opp->opp_table = opp_table;
2090 opp_debug_create_one(new_opp, opp_table);
2092 if (!_opp_supported_by_regulators(new_opp, opp_table)) {
2099 if (lazy_linking_pending(opp_table))
2102 _required_opps_available(new_opp, opp_table->required_opp_count);
2109 * @opp_table: OPP table
2128 int _opp_add_v1(struct opp_table *opp_table, struct device *dev,
2135 if (!assert_single_clk(opp_table, 0))
2138 new_opp = _opp_allocate(opp_table);
2146 tol = u_volt * opp_table->voltage_tolerance_v1 / 100;
2153 ret = _opp_add(dev, new_opp, opp_table);
2165 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ADD, new_opp);
2180 static int _opp_set_supported_hw(struct opp_table *opp_table,
2184 if (opp_table->supported_hw)
2187 opp_table->supported_hw = kmemdup_array(versions, count,
2189 if (!opp_table->supported_hw)
2192 opp_table->supported_hw_count = count;
2197 static void _opp_put_supported_hw(struct opp_table *opp_table)
2199 if (opp_table->supported_hw) {
2200 kfree(opp_table->supported_hw);
2201 opp_table->supported_hw = NULL;
2202 opp_table->supported_hw_count = 0;
2212 static int _opp_set_prop_name(struct opp_table *opp_table, const char *name)
2215 if (!opp_table->prop_name) {
2216 opp_table->prop_name = kstrdup(name, GFP_KERNEL);
2217 if (!opp_table->prop_name)
2224 static void _opp_put_prop_name(struct opp_table *opp_table)
2226 if (opp_table->prop_name) {
2227 kfree(opp_table->prop_name);
2228 opp_table->prop_name = NULL;
2239 static int _opp_set_regulators(struct opp_table *opp_table, struct device *dev,
2254 if (opp_table->regulators)
2257 opp_table->regulators = kmalloc_objs(*opp_table->regulators, count);
2258 if (!opp_table->regulators)
2270 opp_table->regulators[i] = reg;
2273 opp_table->regulator_count = count;
2277 opp_table->config_regulators = _opp_config_regulator_single;
2283 regulator_put(opp_table->regulators[--i]);
2285 kfree(opp_table->regulators);
2286 opp_table->regulators = NULL;
2287 opp_table->regulator_count = -1;
2292 static void _opp_put_regulators(struct opp_table *opp_table)
2296 if (!opp_table->regulators)
2299 if (opp_table->enabled) {
2300 for (i = opp_table->regulator_count - 1; i >= 0; i--)
2301 regulator_disable(opp_table->regulators[i]);
2304 for (i = opp_table->regulator_count - 1; i >= 0; i--)
2305 regulator_put(opp_table->regulators[i]);
2307 kfree(opp_table->regulators);
2308 opp_table->regulators = NULL;
2309 opp_table->regulator_count = -1;
2312 static void _put_clks(struct opp_table *opp_table, int count)
2317 clk_put(opp_table->clks[i]);
2319 kfree(opp_table->clks);
2320 opp_table->clks = NULL;
2332 static int _opp_set_clknames(struct opp_table *opp_table, struct device *dev,
2356 if (opp_table->clks)
2359 opp_table->clks = kmalloc_objs(*opp_table->clks, count);
2360 if (!opp_table->clks)
2373 opp_table->clks[i] = clk;
2376 opp_table->clk_count = count;
2377 opp_table->config_clks = config_clks;
2381 if (!opp_table->config_clks)
2382 opp_table->config_clks = _opp_config_clk_single;
2396 opp_table->clk = opp_table->clks[0];
2402 _put_clks(opp_table, i);
2406 static void _opp_put_clknames(struct opp_table *opp_table)
2408 if (!opp_table->clks)
2411 opp_table->config_clks = NULL;
2412 opp_table->clk = ERR_PTR(-ENODEV);
2414 _put_clks(opp_table, opp_table->clk_count);
2422 static int _opp_set_config_regulators_helper(struct opp_table *opp_table,
2426 if (!opp_table->config_regulators)
2427 opp_table->config_regulators = config_regulators;
2432 static void _opp_put_config_regulators_helper(struct opp_table *opp_table)
2434 if (opp_table->config_regulators)
2435 opp_table->config_regulators = NULL;
2438 static int _opp_set_required_dev(struct opp_table *opp_table,
2443 struct opp_table *required_table, *pd_table;
2447 if (opp_table->is_genpd) {
2452 if (index >= opp_table->required_opp_count) {
2457 required_table = opp_table->required_opp_tables[index];
2470 * create separate instances of 'struct opp_table' from it, then it is
2484 opp_table->required_opp_tables[index] = pd_table;
2490 opp_table->required_devs[index] = required_dev;
2494 static void _opp_put_required_dev(struct opp_table *opp_table,
2497 opp_table->required_devs[index] = NULL;
2503 _opp_put_required_dev(data->opp_table,
2506 _opp_put_regulators(data->opp_table);
2508 _opp_put_supported_hw(data->opp_table);
2510 _opp_put_config_regulators_helper(data->opp_table);
2512 _opp_put_prop_name(data->opp_table);
2514 _opp_put_clknames(data->opp_table);
2516 dev_pm_opp_put_opp_table(data->opp_table);
2539 struct opp_table *opp_table;
2548 opp_table = _add_opp_table(dev, false);
2549 if (IS_ERR(opp_table)) {
2551 return PTR_ERR(opp_table);
2554 data->opp_table = opp_table;
2558 if (WARN_ON(!list_empty(&opp_table->opp_list))) {
2565 ret = _opp_set_clknames(opp_table, dev, config->clk_names,
2579 ret = _opp_set_prop_name(opp_table, config->prop_name);
2588 ret = _opp_set_config_regulators_helper(opp_table, dev,
2598 ret = _opp_set_supported_hw(opp_table, config->supported_hw,
2608 ret = _opp_set_regulators(opp_table, dev,
2617 ret = _opp_set_required_dev(opp_table, dev,
2713 struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table,
2714 struct opp_table *dst_table,
2765 int dev_pm_opp_xlate_performance_state(struct opp_table *src_table,
2766 struct opp_table *dst_table,
2834 struct opp_table *opp_table;
2837 opp_table = _add_opp_table(dev, true);
2838 if (IS_ERR(opp_table))
2839 return PTR_ERR(opp_table);
2842 opp_table->regulator_count = 1;
2844 ret = _opp_add_v1(opp_table, dev, data, true);
2846 dev_pm_opp_put_opp_table(opp_table);
2868 /* Find the opp_table */
2869 struct opp_table *opp_table __free(put_opp_table) =
2873 if (IS_ERR(opp_table)) {
2875 opp_table);
2876 return PTR_ERR(opp_table);
2879 if (!assert_single_clk(opp_table, 0))
2882 scoped_guard(mutex, &opp_table->lock) {
2884 list_for_each_entry(tmp_opp, &opp_table->opp_list, node) {
2903 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ENABLE,
2906 blocking_notifier_call_chain(&opp_table->head,
2929 /* Find the opp_table */
2930 struct opp_table *opp_table __free(put_opp_table) =
2935 if (IS_ERR(opp_table)) {
2936 r = PTR_ERR(opp_table);
2941 if (!assert_single_clk(opp_table, 0))
2944 scoped_guard(mutex, &opp_table->lock) {
2946 list_for_each_entry(tmp_opp, &opp_table->opp_list, node) {
2967 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ADJUST_VOLTAGE,
2988 struct opp_table *opp_table __free(put_opp_table) =
2991 if (IS_ERR(opp_table))
2995 if (unlikely(!opp_table->regulators))
2999 if (!opp_table->enabled)
3002 for (i = 0; i < opp_table->regulator_count; i++) {
3003 reg = opp_table->regulators[i];
3061 struct opp_table *opp_table __free(put_opp_table) =
3064 if (IS_ERR(opp_table))
3065 return PTR_ERR(opp_table);
3067 return blocking_notifier_chain_register(&opp_table->head, nb);
3081 struct opp_table *opp_table __free(put_opp_table) =
3084 if (IS_ERR(opp_table))
3085 return PTR_ERR(opp_table);
3087 return blocking_notifier_chain_unregister(&opp_table->head, nb);
3101 struct opp_table *opp_table __free(put_opp_table) =
3104 if (IS_ERR(opp_table)) {
3105 int error = PTR_ERR(opp_table);
3108 WARN(1, "%s: opp_table: %d\n",
3119 if (_opp_remove_all_static(opp_table))
3120 dev_pm_opp_put_opp_table(opp_table);