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

Function rt_platform_driver_register

components/drivers/core/platform.c:52–63  ·  view source on GitHub ↗

* @brief This function register a rt_driver to platform bus. * * @return the error code, RT_EOK on successfully. */

Source from the content-addressed store, hash-verified

50 * @return the error code, RT_EOK on successfully.
51 */
52rt_err_t rt_platform_driver_register(struct rt_platform_driver *pdrv)
53{
54 RT_ASSERT(pdrv != RT_NULL);
55
56 pdrv->parent.bus = &platform_bus;
57#if RT_NAME_MAX > 0
58 rt_strcpy(pdrv->parent.parent.name, pdrv->name);
59#else
60 pdrv->parent.parent.name = pdrv->name;
61#endif
62 return rt_driver_register(&pdrv->parent);
63}
64
65/**
66 * @brief This function register a rt_device to platform bus.

Callers 13

reset_simple_registerFunction · 0.85
fixed_clk_drv_registerFunction · 0.85
syscon_drv_registerFunction · 0.85
regulator_gpio_registerFunction · 0.85
regulator_fixed_registerFunction · 0.85
pl011_drv_registerFunction · 0.85
dw8250_drv_registerFunction · 0.85
clk_rk3568_registerFunction · 0.85
clk_rk3588_registerFunction · 0.85
rk_timer_drv_registerFunction · 0.85

Calls 2

rt_strcpyFunction · 0.85
rt_driver_registerFunction · 0.85

Tested by

no test coverage detected