core.c (cae68764583bab180c1ded681dea8c16dda87670) | core.c (19526d092ceb32d619fce73fe0bdca4370890124) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Generic OPP Interface 4 * 5 * Copyright (C) 2009-2010 Texas Instruments Incorporated. 6 * Nishanth Menon 7 * Romit Dasgupta 8 * Kevin Hilman --- 879 unchanged lines hidden (view full) --- 888{ 889 struct opp_table **required_opp_tables = opp_table->required_opp_tables; 890 struct device **genpd_virt_devs = opp_table->genpd_virt_devs; 891 int i, ret = 0; 892 893 if (!required_opp_tables) 894 return 0; 895 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Generic OPP Interface 4 * 5 * Copyright (C) 2009-2010 Texas Instruments Incorporated. 6 * Nishanth Menon 7 * Romit Dasgupta 8 * Kevin Hilman --- 879 unchanged lines hidden (view full) --- 888{ 889 struct opp_table **required_opp_tables = opp_table->required_opp_tables; 890 struct device **genpd_virt_devs = opp_table->genpd_virt_devs; 891 int i, ret = 0; 892 893 if (!required_opp_tables) 894 return 0; 895 |
896 /* required-opps not fully initialized yet */ 897 if (lazy_linking_pending(opp_table)) 898 return -EBUSY; 899 |
|
896 /* 897 * We only support genpd's OPPs in the "required-opps" for now, as we 898 * don't know much about other use cases. Error out if the required OPP 899 * doesn't belong to a genpd. 900 */ 901 if (unlikely(!required_opp_tables[0]->is_genpd)) { 902 dev_err(dev, "required-opps don't belong to a genpd\n"); 903 return -ENOENT; 904 } 905 | 900 /* 901 * We only support genpd's OPPs in the "required-opps" for now, as we 902 * don't know much about other use cases. Error out if the required OPP 903 * doesn't belong to a genpd. 904 */ 905 if (unlikely(!required_opp_tables[0]->is_genpd)) { 906 dev_err(dev, "required-opps don't belong to a genpd\n"); 907 return -ENOENT; 908 } 909 |
906 /* required-opps not fully initialized yet */ 907 if (lazy_linking_pending(opp_table)) 908 return -EBUSY; 909 | |
910 /* Single genpd case */ 911 if (!genpd_virt_devs) 912 return _set_required_opp(dev, dev, opp, 0); 913 914 /* Multiple genpd case */ 915 916 /* 917 * Acquire genpd_virt_dev_lock to make sure we don't use a genpd_dev --- 2016 unchanged lines hidden --- | 910 /* Single genpd case */ 911 if (!genpd_virt_devs) 912 return _set_required_opp(dev, dev, opp, 0); 913 914 /* Multiple genpd case */ 915 916 /* 917 * Acquire genpd_virt_dev_lock to make sure we don't use a genpd_dev --- 2016 unchanged lines hidden --- |