Lines Matching refs:pdev
34 struct rt_platform_device *pdev = rt_calloc(1, sizeof(*pdev)); in rt_platform_device_alloc() local
36 if (!pdev) in rt_platform_device_alloc()
41 pdev->parent.bus = &platform_bus; in rt_platform_device_alloc()
42 pdev->name = name; in rt_platform_device_alloc()
44 return pdev; in rt_platform_device_alloc()
70 rt_err_t rt_platform_device_register(struct rt_platform_device *pdev) in rt_platform_device_register() argument
72 RT_ASSERT(pdev != RT_NULL); in rt_platform_device_register()
74 return rt_bus_add_device(&platform_bus, &pdev->parent); in rt_platform_device_register()
80 struct rt_platform_device *pdev = rt_container_of(dev, struct rt_platform_device, parent); in platform_match() local
87 pdev->id = rt_ofw_node_match(np, pdrv->ids); in platform_match()
89 pdev->id = RT_NULL; in platform_match()
91 if (pdev->id) in platform_match()
98 if (pdev->name && pdrv->name) in platform_match()
100 if (pdev->name == pdrv->name) in platform_match()
106 return !rt_strcmp(pdrv->name, pdev->name); in platform_match()
117 struct rt_platform_device *pdev = rt_container_of(dev, struct rt_platform_device, parent); in platform_probe() local
128 (pdev->name && pdev->name[0]) ? pdev->name : rt_ofw_node_full_name(np) in platform_probe()
130 pdev->name in platform_probe()
137 err = pdrv->probe(pdev); in platform_probe()
164 struct rt_platform_device *pdev = rt_container_of(dev, struct rt_platform_device, parent); in platform_remove() local
168 pdrv->remove(pdev); in platform_remove()
172 rt_platform_ofw_free(pdev); in platform_remove()
180 struct rt_platform_device *pdev = rt_container_of(dev, struct rt_platform_device, parent); in platform_shutdown() local
184 pdrv->shutdown(pdev); in platform_shutdown()
188 rt_platform_ofw_free(pdev); in platform_shutdown()