Lines Matching defs:np
152 static void pci_pwrctrl_power_off_device(struct device_node *np)
157 for_each_available_child_of_node_scoped(np, child)
160 pdev = of_find_device_by_node(np);
184 struct device_node *np = parent->of_node;
186 for_each_available_child_of_node_scoped(np, child)
205 static int pci_pwrctrl_power_on_device(struct device_node *np)
210 for_each_available_child_of_node_scoped(np, child) {
216 pdev = of_find_device_by_node(np);
247 struct device_node *np = parent->of_node;
251 for_each_available_child_of_node(np, child) {
260 for_each_available_child_of_node_scoped(np, tmp) {
281 static bool pci_pwrctrl_is_required(struct device_node *np)
287 ret = of_property_read_string(np, "compatible", &compat);
294 if (of_pci_supply_present(np))
297 if (of_graph_is_present(np)) {
298 for_each_endpoint_of_node(np, endpoint) {
313 static int pci_pwrctrl_create_device(struct device_node *np,
319 for_each_available_child_of_node_scoped(np, child) {
326 pdev = of_find_device_by_node(np);
332 if (!pci_pwrctrl_is_required(np)) {
333 dev_dbg(parent, "Skipping OF node: %s\n", np->name);
338 pdev = of_platform_device_create(np, NULL, parent);
340 dev_err(parent, "Failed to create pwrctrl device for node: %s\n", np->name);
374 static void pci_pwrctrl_destroy_device(struct device_node *np)
378 for_each_available_child_of_node_scoped(np, child)
381 pdev = of_find_device_by_node(np);
388 of_node_clear_flag(np, OF_POPULATED);
401 struct device_node *np = parent->of_node;
403 for_each_available_child_of_node_scoped(np, child)