Lines Matching refs:np
46 struct platform_device *of_find_device_by_node(struct device_node *np) in of_find_device_by_node() argument
50 dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match); in of_find_device_by_node()
105 struct platform_device *of_device_alloc(struct device_node *np, in of_device_alloc() argument
118 while (of_address_to_resource(np, num_reg, &temp_res) == 0) in of_device_alloc()
120 num_irq = of_irq_count(np); in of_device_alloc()
133 rc = of_address_to_resource(np, i, res); in of_device_alloc()
136 if (of_irq_to_resource_table(np, res, num_irq) != num_irq) in of_device_alloc()
138 np->name); in of_device_alloc()
141 dev->dev.of_node = of_node_get(np); in of_device_alloc()
169 struct device_node *np, in of_platform_device_create_pdata() argument
176 if (!of_device_is_available(np) || in of_platform_device_create_pdata()
177 of_node_test_and_set_flag(np, OF_POPULATED)) in of_platform_device_create_pdata()
180 dev = of_device_alloc(np, bus_id, parent); in of_platform_device_create_pdata()
197 of_node_clear_flag(np, OF_POPULATED); in of_platform_device_create_pdata()
210 struct platform_device *of_platform_device_create(struct device_node *np, in of_platform_device_create() argument
214 return of_platform_device_create_pdata(np, bus_id, NULL, parent); in of_platform_device_create()
296 struct device_node *np) in of_dev_lookup() argument
304 if (!of_device_is_compatible(np, lookup->compatible)) in of_dev_lookup()
306 if (!of_address_to_resource(np, 0, &res)) in of_dev_lookup()
309 pr_debug("%s: devname=%s\n", np->full_name, lookup->name); in of_dev_lookup()