首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    关于platform_device一些讲解「建议收藏」

    这个概念,在开发底层驱动程序时,首先要确认的就是设备的资源信息,例如设备的地址, 在2.6内核中将每个设备的资源用结构platform_device来描述,该结构体定义在kernel\include\linux...num_resources; struct resource * resource; }; 该结构一个重要的元素是resource,该元素存入了最为重要的设备资源信息,定义在kernel\include\linux...= { .probe = ohci_hcd_pxa27x_drv_probe, .remove = ohci_hcd_pxa27x_drv_remove, #ifdef CONFIG_PM....suspend = ohci_hcd_pxa27x_drv_suspend, .resume = ohci_hcd_pxa27x_drv_resume, #endif .driver = {..., }, }; 在驱动初始化函数中调用函数platform_driver_register()注册platform_driver,需要注意的是 ohci_device结构中name元素和ohci_hcd_pxa27x_driver

    69720

    platform_device与platform_driver

    Linux方面也有三个多月了,对代码中的有些结构一直不是非常明确,比方platform_device与platform_driver一直分不清关系。在网上搜了下,做个总结。...具体过程描写叙述例如以下:       Linux从2.6版本号開始引入了platform这个概念,在开发底层驱动程序时,首先要确认的就是设备的资源信息,在2.6内核中将每一个设备的资源用结构platform_device...来描写叙述,该结构体定义在kernel/include/linux/platform_device.h中, struct platform_device { const char * name..._driver = { .probe = ohci_hcd_s3c2410_drv_probe, .remove = ohci_hcd_s3c2410_drv_remove,....shutdown = usb_hcd_platform_shutdown, /*.suspend = ohci_hcd_s3c2410_drv_suspend, */ /*.resume

    81420
    领券