摘要: // //递归函数来设定设备dev的数据, 分配设备的私有数据 int device_of_to_plat(struct udevice *dev) { const struct driver *drv; int ret; if (!dev) return -EINVAL; if (dev_get_ 阅读全文
posted @ 2022-02-21 22:12 liujunhuasd 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 分配设备的私有数据 对父设备probe,执行probe device之前uclass需要调用的一些函数 调用driver的ofdata_to_platdata,将dts信息转化为设备的平台数据 调用driver的probe函数,执行probe device之后uclass需要调用的一些函数 int 阅读全文
posted @ 2022-02-21 20:29 liujunhuasd 阅读(748) 评论(0) 推荐(0) 编辑
摘要: 分配设备的私有数据 static int device_alloc_priv(struct udevice *dev) { const struct driver *drv; void *ptr; int size; //通过设备来获得他的驱动 drv = dev->driver; assert(d 阅读全文
posted @ 2022-02-21 20:28 liujunhuasd 阅读(94) 评论(0) 推荐(0) 编辑