> +int uclass_get_device_by_endpoint(enum uclass_id class_id, struct udevice > *dev, > + int port_idx, int ep_idx, struct udevice > **devp) > +{ > + ofnode node_source = dev_ofnode(dev); > + ofnode node_dest = ofnode_graph_get_remote_node(node_source, port_idx, > ep_idx); > + struct udevice *target = NULL; > + int ret; > + > + if (!ofnode_valid(node_dest)) > + return -EINVAL; > + > + ret = uclass_find_device_by_ofnode(class_id, node_dest, &target); > + if (ret) > + return -ENODEV; > + > + return uclass_get_device_tail(target, 0, devp);
Please disregard this version, I forgot to update this helper. Going through another validation now... Sorry for the noise, Miquèl