2013年9月13日

(转载)驱动之路-platform按键驱动

摘要: 一 、重要知识点: 1.platform设备模型 从Linux 2.6起引入了一套新的驱动管理和注册机制,platform_device和platform_driver,Linux中大部分的设备驱动都可以使用这套机制。platform是一条虚拟的总线。设备用platform_device表示,驱动用platform_driver进行注册,Linux platform driver机制和传统的device driver机制(通过driver_register进行注册)相比,一个明显的优势在于platform机制将设备本身的资源注册进内核,由内核统一管理,在驱动中使用这些资源时通过platform 阅读全文

posted @ 2013-09-13 16:19 熊猫酒仙是也 阅读(245) 评论(0) 推荐(0) 编辑

platform_driver_register()--如何match之后调用probe

摘要: int platform_driver_register(struct platform_driver *drv){ drv->driver.bus = &platform_bus_type;/*关联总线*/ /*关联driver的设备方法*/ if (drv->probe) drv->driver.probe = platform_drv_probe; if (drv->remove) drv->driver.remove = platform_drv_remove; if (drv->shutdown) drv->dr... 阅读全文

posted @ 2013-09-13 14:24 熊猫酒仙是也 阅读(4349) 评论(0) 推荐(0) 编辑

导航