
27 Sep
2024
27 Sep
'24
10:41 p.m.
On 9/27/24 9:01 AM, Venkatesh Yadav Abbarapu wrote:
The .bind function is implemented to bind the correct "half" of the hub that the driver wants to bind, and returning -ENODEV for the other "half".
Signed-off-by: Venkatesh Yadav Abbarapu venkatesh.abbarapu@amd.com
common/usb_onboard_hub.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
diff --git a/common/usb_onboard_hub.c b/common/usb_onboard_hub.c index 00808ed45e..9c50ca09c9 100644 --- a/common/usb_onboard_hub.c +++ b/common/usb_onboard_hub.c @@ -162,6 +162,25 @@ err: return ret; }
+static int usb_onboard_hub_bind(struct udevice *dev) +{
- struct ofnode_phandle_args phandle;
- const void *fdt = gd->fdt_blob;
- int ret, off;
- if (dev_read_phandle_with_args(dev, "peer-hub", NULL, 0, 0, &phandle)) {
Return the error code:
ret = dev_read_phandle_with_args() if (ret) { ... return ret; }
dev_err(dev, "peer-hub not specified\n");
return -ENOENT;
- }
- off = ofnode_to_offset(phandle.node);
- ret = fdt_node_check_compatible(fdt, off, "usb424,5744");
return fdt_node_check_compatible(...);