MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_phy_device_register

Function rt_phy_device_register

components/drivers/phy/phy.c:505–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503RT_PHY_DRIVER_REGISTER(genphy);
504
505rt_err_t rt_phy_device_register(struct rt_phy_device *pdev)
506{
507 rt_err_t err;
508 RT_ASSERT(pdev != RT_NULL);
509 err = rt_bus_add_device(&rt_phy_bus, &pdev->parent);
510 if (err)
511 {
512 return err;
513 }
514 if(!pdev->drv)
515 pdev->drv = &genphy;
516
517 return RT_EOK;
518}
519
520rt_err_t rt_phy_driver_register(struct rt_phy_driver *pdrv)
521{

Callers 1

rt_phy_device_createFunction · 0.85

Calls 1

rt_bus_add_deviceFunction · 0.85

Tested by

no test coverage detected