Lines Matching +full:pre +full:- +full:verified

1 /* SPDX-License-Identifier: GPL-2.0+ */
14 #include <dm/uclass-id.h>
54 * (U-Boot exit)
60 * U-Boot exits and the OS is started
66 * a selective device removal as specified by the remove-stage and the
86 * struct udevice - An instance of a driver
92 * a U_BOOT_DEVICE() macro (in which case platdata is non-NULL) or a node
119 * @req_seq: Requested sequence number for this device (-1 = any)
120 * @seq: Allocated sequence number for this device (-1 = none). This is set up
124 * add to this list. Memory so-allocated will be freed
155 #define device_get_ops(dev) (dev->driver->ops)
157 /* Returns non-zero if the device is active (probed and not removed) */
158 #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
162 return ofnode_to_offset(dev->node); in dev_of_offset()
167 dev->node = offset_to_ofnode(of_offset); in dev_set_of_offset()
172 return ofnode_valid(dev->node); in dev_has_of_node()
176 * struct udevice_id - Lists the compatible strings supported by a driver
192 * struct driver - A driver for a feature or peripheral
195 * The device needs information to set itself up - this is provided either
210 * @remove: Called to remove a device, i.e. de-activate it
218 * @priv_auto_alloc_size: If non-zero this is the size of the private data
219 * to be allocated in the device's ->priv pointer. If zero, then the driver
221 * @platdata_auto_alloc_size: If non-zero this is the size of the
222 * platform data to be allocated in the device's ->platdata pointer.
223 * This is typically only useful for device-tree-aware drivers (those with
228 * value is non-zero.
230 * its children. If non-zero this is the size of this data, to be allocated
232 * @ops: Driver-specific operations. This is typically a list of function
235 * @flags: driver flags - see DM_FLAGS_...
253 const void *ops; /* driver-specific operations */
257 /* Declare a new U-Boot driver */
266 * dev_get_platdata() - Get the platform data for a device
276 * dev_get_parent_platdata() - Get the parent platform data for a device
286 * dev_get_uclass_platdata() - Get the uclass platform data for a device
296 * dev_get_priv() - Get the private data for a device
306 * dev_get_parent_priv() - Get the parent private data for a device
320 * dev_get_uclass_priv() - Get the private uclass data for a device
330 * struct dev_get_parent() - Get the parent of a device
338 * dev_get_driver_data() - get the driver data used to bind a device
347 * { .compatible = "nvidia,tegra114-i2c", .data = TYPE_114 },
348 * { .compatible = "nvidia,tegra20-i2c", .data = TYPE_STD },
349 * { .compatible = "nvidia,tegra20-i2c-dvc", .data = TYPE_DVC },
365 * dev_get_driver_ops() - get the device's driver's operations
371 * @return void pointer to driver's operations or NULL for NULL-dev or NULL-ops
376 * device_get_uclass_id() - return the uclass ID of a device
384 * dev_get_uclass_name() - return the uclass name of a device
394 * device_get_child() - Get the child of a device by index
402 * @return 0 if OK, -ENODEV if no such device, other error if the device fails
408 * device_find_child_by_seq() - Find a child device based on a sequence
413 * If there is no such device then this will return -ENODEV.
424 * @return 0 if OK, -ve on error
430 * device_get_child_by_seq() - Get a child device based on a sequence
442 * @return 0 if OK, -ve on error
448 * device_find_child_by_of_offset() - Find a child device based on FDT offset
455 * @return 0 if OK, -ve on error
461 * device_get_child_by_of_offset() - Get a child device based on FDT offset
470 * @return 0 if OK, -ve on error
476 * device_find_global_by_ofnode() - Get a device based on ofnode
485 * @return 0 if OK, -ve on error
491 * device_get_global_by_ofnode() - Get a device based on ofnode
500 * @return 0 if OK, -ve on error
505 * device_find_first_child() - Find the first child of a device
514 * device_find_next_child() - Find the next child of a device
523 * device_find_first_inactive_child() - Find the first inactive child
533 * @return 0 if found, else -ENODEV
540 * device_find_first_child_by_uclass() - Find the first child of a device in uc
545 * @return 0 if found, else -ENODEV
552 * device_find_child_by_name() - Find a child by device name
557 * @return 0 if found, else -ENODEV
563 * device_has_children() - check if a device has any children
571 * device_has_active_children() - check if a device has any active children
580 * device_is_last_sibling() - check if a device is the last sibling
587 * @return true if there are no more siblings after this one - i.e. is it
593 * device_set_name() - set the name of a device
605 * @return 0 if OK, -ENOMEM if there is not enough memory to allocate the
611 * device_set_name_alloced() - note that a device name is allocated
621 * device_is_compatible() - check if the device is compatible with the compat
625 * @dev: udevice pointer for which compatible needs to be verified.
626 * @compat: Compatible string which needs to verified in the given
633 * of_machine_is_compatible() - check if the machine is compatible with
638 * @compat: Compatible string which needs to verified
644 * dev_disable_by_path() - Disable a device given its device tree path
647 * @return 0 on success, -ve on error
652 * dev_enable_by_path() - Enable a device given its device tree path
655 * @return 0 on success, -ve on error
660 * device_is_on_pci_bus - Test if a device is on a PCI bus
667 return device_get_uclass_id(dev->parent) == UCLASS_PCI; in device_is_on_pci_bus()
671 * device_foreach_child_safe() - iterate through child devices safely
680 list_for_each_entry_safe(pos, next, &parent->child_head, sibling_node)
683 * dm_scan_fdt_dev() - Bind child device in a the device tree
685 * This handles device which have sub-nodes in the device tree. It scans all
686 * sub-nodes and binds drivers for each node where a driver can be found.
688 * If this is called prior to relocation, only pre-relocation devices will be
689 * bound (those marked with u-boot,dm-pre-reloc in the device tree, or where
694 * @return 0 if OK, -ve on error
714 * devres_alloc() - Allocate device resource data
730 * devres_free() - Free device resource data
738 * devres_add() - Register device resource
749 * devres_find() - Find device resource
765 * devres_get() - Find devres, if non-existent, add one atomically
781 * devres_remove() - Find a device resource and remove it
798 * devres_destroy() - Find a device resource and destroy it
809 * only the devres-allocated data will be freed. The caller becomes
812 * @return 0 if devres is found and freed, -ENOENT if not found.
818 * devres_release() - Find a device resource and destroy it, calling release
829 * @return 0 if devres is found and freed, -ENOENT if not found.
836 * devm_kmalloc() - Resource-managed kmalloc
866 * devm_kfree() - Resource-managed kfree