• Home
  • Raw
  • Download

Lines Matching refs:np

34 static struct device_node *_opp_of_get_opp_desc_node(struct device_node *np, int index)  in _opp_of_get_opp_desc_node()  argument
37 return of_parse_phandle(np, "operating-points-v2", index); in _opp_of_get_opp_desc_node()
50 struct device_node *np; in _managed_opp() local
52 np = _opp_of_get_opp_desc_node(dev->of_node, index); in _managed_opp()
53 if (!np) { in _managed_opp()
59 if (opp_table->np == np) { in _managed_opp()
76 of_node_put(np); in _managed_opp()
90 if (opp->np == opp_np) { in _find_opp_of_np()
102 static struct device_node *of_parse_required_opp(struct device_node *np, int index) in of_parse_required_opp() argument
104 return of_parse_phandle(np, "required-opps", index); in of_parse_required_opp()
125 if (opp_table_np == opp_table->np) { in _find_table_of_opp_np()
167 struct device_node *required_np, *np; in _opp_table_alloc_required_tables() local
171 np = of_get_next_available_child(opp_np, NULL); in _opp_table_alloc_required_tables()
172 if (!np) { in _opp_table_alloc_required_tables()
177 count = of_count_phandle_with_args(np, "required-opps", NULL); in _opp_table_alloc_required_tables()
191 required_np = of_parse_required_opp(np, i); in _opp_table_alloc_required_tables()
219 of_node_put(np); in _opp_table_alloc_required_tables()
224 struct device_node *np, *opp_np; in _of_init_opp_table() local
231 np = of_node_get(dev->of_node); in _of_init_opp_table()
232 if (!np) { in _of_init_opp_table()
236 if (!of_property_read_u32(np, "clock-latency", &val)) { in _of_init_opp_table()
239 of_property_read_u32(np, "voltage-tolerance", &opp_table->voltage_tolerance_v1); in _of_init_opp_table()
241 if (of_find_property(np, "#power-domain-cells", NULL)) { in _of_init_opp_table()
246 opp_np = _opp_of_get_opp_desc_node(np, index); in _of_init_opp_table()
247 of_node_put(np); in _of_init_opp_table()
259 opp_table->np = opp_np; in _of_init_opp_table()
301 struct device_node *np; in _of_opp_alloc_required_opps() local
318 np = of_parse_required_opp(opp->np, i); in _of_opp_alloc_required_opps()
319 if (unlikely(!np)) { in _of_opp_alloc_required_opps()
324 required_opps[i] = _find_opp_of_np(required_table, np); in _of_opp_alloc_required_opps()
325 of_node_put(np); in _of_opp_alloc_required_opps()
328 pr_err("%s: Unable to find required OPP node: %pOF (%d)\n", __func__, opp->np, i); in _of_opp_alloc_required_opps()
344 struct device_node *np, *opp_np; in _bandwidth_supported() local
348 np = of_node_get(dev->of_node); in _bandwidth_supported()
349 if (!np) { in _bandwidth_supported()
352 opp_np = _opp_of_get_opp_desc_node(np, 0); in _bandwidth_supported()
353 of_node_put(np); in _bandwidth_supported()
355 opp_np = of_node_get(opp_table->np); in _bandwidth_supported()
362 np = of_get_next_available_child(opp_np, NULL); in _bandwidth_supported()
364 if (!np) { in _bandwidth_supported()
368 prop = of_find_property(np, "opp-peak-kBps", NULL); in _bandwidth_supported()
369 of_node_put(np); in _bandwidth_supported()
378 struct device_node *np; in dev_pm_opp_of_find_icc_paths() local
389 np = of_node_get(dev->of_node); in dev_pm_opp_of_find_icc_paths()
390 if (!np) { in dev_pm_opp_of_find_icc_paths()
394 count = of_count_phandle_with_args(np, "interconnects", "#interconnect-cells"); in dev_pm_opp_of_find_icc_paths()
395 of_node_put(np); in dev_pm_opp_of_find_icc_paths()
440 …tic bool _opp_is_supported(struct device *dev, struct opp_table *opp_table, struct device_node *np) in _opp_is_supported() argument
453 if (of_find_property(np, "opp-supported-hw", NULL)) { in _opp_is_supported()
460 count = of_property_count_u32_elems(np, "opp-supported-hw"); in _opp_is_supported()
473 ret = of_property_read_u32_index(np, "opp-supported-hw", i * levels + j, &val); in _opp_is_supported()
505 prop = of_find_property(opp->np, name, NULL); in opp_parse_supplies()
511 prop = of_find_property(opp->np, name, NULL); in opp_parse_supplies()
537 vcount = of_property_count_u32_elems(opp->np, name); in opp_parse_supplies()
555 ret = of_property_read_u32_array(opp->np, name, microvolt, vcount); in opp_parse_supplies()
566 prop = of_find_property(opp->np, name, NULL); in opp_parse_supplies()
572 prop = of_find_property(opp->np, name, NULL); in opp_parse_supplies()
576 icount = of_property_count_u32_elems(opp->np, name); in opp_parse_supplies()
596 ret = of_property_read_u32_array(opp->np, name, microamp, icount); in opp_parse_supplies()
641 static int _read_bw(struct dev_pm_opp *new_opp, struct opp_table *table, struct device_node *np, bo… in _read_bw() argument
648 prop = of_find_property(np, name, NULL); in _read_bw()
664 ret = of_property_read_u32_array(np, name, bw, count); in _read_bw()
683 …atic int _read_opp_key(struct dev_pm_opp *new_opp, struct opp_table *table, struct device_node *np, in _read_opp_key() argument
690 ret = of_property_read_u64(np, "opp-hz", &rate); in _read_opp_key()
707 ret = _read_bw(new_opp, table, np, true); in _read_opp_key()
710 ret = _read_bw(new_opp, table, np, false); in _read_opp_key()
718 if (!of_property_read_u32(np, "opp-level", &new_opp->level)) { in _read_opp_key()
753 …pm_opp *_opp_add_static_v2(struct opp_table *opp_table, struct device *dev, struct device_node *np) in _opp_add_static_v2() argument
765 ret = _read_opp_key(new_opp, opp_table, np, &rate_not_available); in _opp_add_static_v2()
772 if (!_opp_is_supported(dev, opp_table, np)) { in _opp_add_static_v2()
777 new_opp->turbo = of_property_read_bool(np, "turbo-mode"); in _opp_add_static_v2()
779 new_opp->np = np; in _opp_add_static_v2()
788 if (!of_property_read_u32(np, "clock-latency-ns", &val)) { in _opp_add_static_v2()
811 if (of_property_read_bool(np, "opp-suspend")) { in _opp_add_static_v2()
851 struct device_node *np; in _of_add_opp_table_v2() local
867 for_each_available_child_of_node(opp_table->np, np) in _of_add_opp_table_v2()
869 opp = _opp_add_static_v2(opp_table, dev, np); in _of_add_opp_table_v2()
873 of_node_put(np); in _of_add_opp_table_v2()
994 if (opp_table->np) { in dev_pm_opp_of_add_table()
1137 struct device_node *np, *tmp_np, *cpu_np; in dev_pm_opp_of_get_sharing_cpus() local
1141 np = dev_pm_opp_of_get_opp_desc_node(cpu_dev); in dev_pm_opp_of_get_sharing_cpus()
1142 if (!np) { in dev_pm_opp_of_get_sharing_cpus()
1150 if (!of_property_read_bool(np, "opp-shared")) { in dev_pm_opp_of_get_sharing_cpus()
1177 if (np == tmp_np) { in dev_pm_opp_of_get_sharing_cpus()
1185 of_node_put(np); in dev_pm_opp_of_get_sharing_cpus()
1201 int of_get_required_opp_performance_state(struct device_node *np, int index) in of_get_required_opp_performance_state() argument
1208 required_np = of_parse_required_opp(np, index); in of_get_required_opp_performance_state()
1215 … pr_err("%s: Failed to find required OPP table %pOF: %ld\n", __func__, np, PTR_ERR(opp_table)); in of_get_required_opp_performance_state()
1249 return of_node_get(opp->np); in dev_pm_opp_get_of_node()
1268 struct device_node *np; in _get_power() local
1274 np = of_node_get(dev->of_node); in _get_power()
1275 if (!np) { in _get_power()
1279 ret = of_property_read_u32(np, "dynamic-power-coefficient", &cap); in _get_power()
1280 of_node_put(np); in _get_power()
1320 struct device_node *np; in dev_pm_opp_of_register_em() local
1335 np = of_node_get(dev->of_node); in dev_pm_opp_of_register_em()
1336 if (!np) { in dev_pm_opp_of_register_em()
1348 ret = of_property_read_u32(np, "dynamic-power-coefficient", &cap); in dev_pm_opp_of_register_em()
1349 of_node_put(np); in dev_pm_opp_of_register_em()