linux 的 .probe

         linux 驱动中  .probe  经常在注册的时候出现,     各种场合都会用上   已知记录的 platform_drver_register 和 module_platform_driver 宏   其实这个宏最终还是调用 platform_drver_register .  

platform_driver_register(struct platform_driver *drv) 

driver_register(&drv->driver);

bus_add_driver(drv);

  driver_attach(drv);

return bus_for_each_dev(drv->bus, NULL, drv, __driver_attach);

error = fn(dev, data); (也就是上一个函数的最后一个函数参数 __driver_attach


static int __driver_attach(struct device *dev, void *data)

driver_probe_device(drv, dev);

ret = really_probe(dev, drv);

static int really_probe(struct device *dev, struct device_driver *drv)

你可能感兴趣的:(linux 的 .probe)