Lines Matching defs:new_opp
758 static int _read_rate(struct dev_pm_opp *new_opp, struct opp_table *opp_table,
790 new_opp->rates[i] = (unsigned long)rates[i];
793 WARN_ON(new_opp->rates[i] != rates[i]);
802 static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *opp_table,
833 new_opp->bandwidth[i].peak = kBps_to_icc(bw[i]);
835 new_opp->bandwidth[i].avg = kBps_to_icc(bw[i]);
843 static int _read_opp_key(struct dev_pm_opp *new_opp,
849 ret = _read_rate(new_opp, opp_table, np);
860 ret = _read_bw(new_opp, opp_table, np, true);
863 ret = _read_bw(new_opp, opp_table, np, false);
870 if (!of_property_read_u32(np, "opp-level", &new_opp->level))
906 struct dev_pm_opp *new_opp;
910 new_opp = _opp_allocate(opp_table);
911 if (!new_opp)
914 ret = _read_opp_key(new_opp, opp_table, np);
927 new_opp->turbo = of_property_read_bool(np, "turbo-mode");
929 new_opp->np = of_node_get(np);
930 new_opp->dynamic = false;
931 new_opp->available = true;
933 ret = _of_opp_alloc_required_opps(opp_table, new_opp);
938 new_opp->clock_latency_ns = val;
940 ret = opp_parse_supplies(new_opp, dev, opp_table);
944 ret = _opp_add(dev, new_opp, opp_table);
956 if (_opp_compare_key(opp_table, new_opp, opp_table->suspend_opp) == 1) {
958 new_opp->suspend = true;
959 opp_table->suspend_opp = new_opp;
962 new_opp->suspend = true;
963 opp_table->suspend_opp = new_opp;
967 if (new_opp->clock_latency_ns > opp_table->clock_latency_ns_max)
968 opp_table->clock_latency_ns_max = new_opp->clock_latency_ns;
971 __func__, new_opp->turbo, new_opp->rates[0],
972 new_opp->supplies[0].u_volt, new_opp->supplies[0].u_volt_min,
973 new_opp->supplies[0].u_volt_max, new_opp->clock_latency_ns,
974 new_opp->level);
980 blocking_notifier_call_chain(&opp_table->head, OPP_EVENT_ADD, new_opp);
981 return new_opp;
984 _of_opp_free_required_opps(opp_table, new_opp);
986 _opp_free(new_opp);