diff options
| author | Tom Rini <[email protected]> | 2025-04-11 09:11:38 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-04-11 09:11:38 -0600 |
| commit | 295376ce8a32268a1bb0879eb0448e0c0e580727 (patch) | |
| tree | 920c68e2656b02c2c3eb3ec49de6dec42214fb69 /include/dm | |
| parent | dea298c62e904dd697e7b91bd3dae5d839f31d8f (diff) | |
| parent | ba71e4ef4d3d3edc05c29e14f0ed84ecce4bb051 (diff) | |
Merge tag 'u-boot-imx-master-20250411' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25652
- Add i.MX8MP LDB support.
- Various phycore-imx93 environment improvements.
- Add support for Toradex SMARC iMX8MP.
Diffstat (limited to 'include/dm')
| -rw-r--r-- | include/dm/uclass.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/dm/uclass.h b/include/dm/uclass.h index c2793040923..8fdd7272511 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -334,6 +334,30 @@ int uclass_get_device_by_driver(enum uclass_id id, const struct driver *drv, struct udevice **devp); /** + * uclass_get_device_by_endpoint() - Get a uclass device for a remote endpoint + * + * This searches through the parents of the specified remote endpoint + * for the first device matching the uclass. Said otherwise, this helper + * goes through the graph (endpoint) representation and searches for + * matching devices. Endpoints can be subnodes of the "port" node or + * subnodes of ports identified with a reg property, themselves in a + * "ports" container. + * + * The device is probed to activate it ready for use. + * + * @class_id: uclass ID to look up + * @dev: Device to start from + * @port_idx: Index of the port to follow, -1 if there is a single 'port' + * node without reg. + * @ep_idx: Index of the endpoint to follow, -1 if there is a single 'endpoint' + * node without reg. + * @target: Returns pointer to the first device matching the expected uclass. + * Return: 0 if OK, -ve on error + */ +int uclass_get_device_by_endpoint(enum uclass_id class_id, struct udevice *dev, + int port_idx, int ep_idx, struct udevice **target); + +/** * uclass_first_device() - Get the first device in a uclass * * The device returned is probed if necessary, and ready for use |
