2 * Copyright (c) 2013 Google, Inc
5 * Pavel Herrmann <morpheus.ibis@gmail.com>
7 * SPDX-License-Identifier: GPL-2.0+
13 #include <dm/uclass-id.h>
16 * lists_driver_lookup_name() - Return u_boot_driver corresponding to name
18 * This function returns a pointer to a driver given its name. This is used
19 * for binding a driver given its name and platdata.
21 * @name: Name of driver to look up
22 * @return pointer to driver, or NULL if not found
24 struct driver *lists_driver_lookup_name(const char *name);
27 * lists_uclass_lookup() - Return uclass_driver based on ID of the class
30 * This function returns the pointer to uclass_driver, which is the class's
31 * base structure based on the ID of the class. Returns NULL on error.
33 struct uclass_driver *lists_uclass_lookup(enum uclass_id id);
36 * lists_bind_drivers() - search for and bind all drivers to parent
38 * This searches the U_BOOT_DEVICE() structures and creates new devices for
39 * each one. The devices will have @parent as their parent.
41 * @parent: parent driver (root)
42 * @early_only: If true, bind only drivers with the DM_INIT_F flag. If false
45 int lists_bind_drivers(struct udevice *parent, bool pre_reloc_only);
48 * lists_bind_fdt() - bind a device tree node
50 * This creates a new device bound to the given device tree node, with
51 * @parent as its parent.
53 * @parent: parent driver (root)
54 * @blob: device tree blob
55 * @offset: offset of this device tree node
56 * @devp: if non-NULL, returns a pointer to the bound device
57 * @return 0 if device was bound, -EINVAL if the device tree is invalid,
58 * other -ve value on error
60 int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
61 struct udevice **devp);