Lines Matching refs:parent

33 static int device_bind_common(struct udevice *parent, const struct driver *drv,  in device_bind_common()  argument
67 dev->parent = parent; in device_bind_common()
126 if (parent) { in device_bind_common()
127 size = parent->driver->per_child_platdata_auto_alloc_size; in device_bind_common()
129 size = parent->uclass->uc_drv-> in device_bind_common()
143 if (parent) in device_bind_common()
144 list_add_tail(&dev->sibling_node, &parent->child_head); in device_bind_common()
156 if (parent && parent->driver->child_post_bind) { in device_bind_common()
157 ret = parent->driver->child_post_bind(dev); in device_bind_common()
167 if (parent) in device_bind_common()
168 pr_debug("Bound device %s to %s\n", dev->name, parent->name); in device_bind_common()
219 int device_bind_with_driver_data(struct udevice *parent, in device_bind_with_driver_data() argument
224 return device_bind_common(parent, drv, name, NULL, driver_data, node, in device_bind_with_driver_data()
228 int device_bind(struct udevice *parent, const struct driver *drv, in device_bind() argument
232 return device_bind_common(parent, drv, name, platdata, 0, in device_bind()
236 int device_bind_ofnode(struct udevice *parent, const struct driver *drv, in device_bind_ofnode() argument
240 return device_bind_common(parent, drv, name, platdata, 0, node, 0, in device_bind_ofnode()
244 int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, in device_bind_by_name() argument
259 return device_bind_common(parent, drv, info->name, in device_bind_by_name()
345 if (dev->parent) { in device_probe()
346 size = dev->parent->driver->per_child_auto_alloc_size; in device_probe()
348 size = dev->parent->uclass->uc_drv-> in device_probe()
359 ret = device_probe(dev->parent); in device_probe()
388 if (dev->parent && device_get_uclass_id(dev) != UCLASS_PINCTRL) in device_probe()
391 if (dev->parent && device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) { in device_probe()
400 if (dev->parent && dev->parent->driver->child_pre_probe) { in device_probe()
401 ret = dev->parent->driver->child_pre_probe(dev); in device_probe()
429 if (dev->parent && device_get_uclass_id(dev) == UCLASS_PINCTRL) in device_probe()
549 int device_get_child(struct udevice *parent, int index, struct udevice **devp) in device_get_child() argument
553 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_get_child()
561 int device_find_child_by_seq(struct udevice *parent, int seq_or_req_seq, in device_find_child_by_seq() argument
570 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_find_child_by_seq()
581 int device_get_child_by_seq(struct udevice *parent, int seq, in device_get_child_by_seq() argument
588 ret = device_find_child_by_seq(parent, seq, false, &dev); in device_get_child_by_seq()
594 ret = device_find_child_by_seq(parent, seq, true, &dev); in device_get_child_by_seq()
599 int device_find_child_by_of_offset(struct udevice *parent, int of_offset, in device_find_child_by_of_offset() argument
606 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_find_child_by_of_offset()
616 int device_get_child_by_of_offset(struct udevice *parent, int node, in device_get_child_by_of_offset() argument
623 ret = device_find_child_by_of_offset(parent, node, &dev); in device_get_child_by_of_offset()
627 static struct udevice *_device_find_global_by_ofnode(struct udevice *parent, in _device_find_global_by_ofnode() argument
632 if (ofnode_equal(dev_ofnode(parent), ofnode)) in _device_find_global_by_ofnode()
633 return parent; in _device_find_global_by_ofnode()
635 list_for_each_entry(dev, &parent->child_head, sibling_node) { in _device_find_global_by_ofnode()
659 int device_find_first_child(struct udevice *parent, struct udevice **devp) in device_find_first_child() argument
661 if (list_empty(&parent->child_head)) { in device_find_first_child()
664 *devp = list_first_entry(&parent->child_head, struct udevice, in device_find_first_child()
674 struct udevice *parent = dev->parent; in device_find_next_child() local
676 if (list_is_last(&dev->sibling_node, &parent->child_head)) { in device_find_next_child()
686 int device_find_first_inactive_child(struct udevice *parent, in device_find_first_inactive_child() argument
693 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_find_first_inactive_child()
704 int device_find_first_child_by_uclass(struct udevice *parent, in device_find_first_child_by_uclass() argument
711 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_find_first_child_by_uclass()
721 int device_find_child_by_name(struct udevice *parent, const char *name, in device_find_child_by_name() argument
728 list_for_each_entry(dev, &parent->child_head, sibling_node) { in device_find_child_by_name()
740 return child->parent; in dev_get_parent()
790 struct udevice *parent = dev->parent; in device_is_last_sibling() local
792 if (!parent) in device_is_last_sibling()
794 return list_is_last(&dev->sibling_node, &parent->child_head); in device_is_last_sibling()
859 struct udevice *parent; in dev_enable_by_path() local
865 ret = device_find_by_ofnode(pnode, &parent); in dev_enable_by_path()
873 return lists_bind_fdt(parent, node, NULL, false); in dev_enable_by_path()