ChinaUnix.net
相关文章推荐:

platform_driver_register

linux内核设备驱动分为字符设备,快设备和网络设备这三种,没错吧?在编写驱动的时候用register_chrdev(),register_blkdev(),register_netdev()来注册驱动,但是我看2.6的内核代码则包含了platform_driver_register(),platform_device_register()这样的函数来注册,有什么区别或者特别之处吗?请问在linux-2.6的内核驱动开发中,platform_driver_register(),platform_device_register()的顺序是先要注册设备,然后才能注册驱动吗...

by againyuan - 内核源码 - 2008-11-04 11:25:28 阅读(13016) 回复(2)

相关讨论

platform_driver_register(struct platform_driver *drv)注册后如何找到驱动匹配的设备 struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); int (*suspend)(struct platform_device *, pm_message_t state); int (*suspend_late)(struct platform_device *, pm_message_t state); int (*resume_early)(struct platf...

by lovesunshine - 驱动开发 - 2008-08-28 21:54:43 阅读(9868) 回复(4)

platform_driver_register(struct platform_driver *drv)注册后如何找到驱动匹配的设备 struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); int (*suspend)(struct platform_device *, pm_message_t state); int (*suspend_late)(struct platform_device *, pm_message_t state)...

by lovesunshine - 内核源码 - 2008-08-04 10:59:40 阅读(21478) 回复(6)

platform_device和platform_driver 首先介绍一下注册一个驱动的步骤: 1、定义一个platform_driver结构 2、初始化这个结构,指定其probe、remove等函数,并初始化其中的driver变量 3、实现其probe、remove等函数 看platform_driver结构,定义于include/linux/platform_device.h文件中: struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)...

by bensonliao - Linux文档专区 - 2010-02-24 23:01:55 阅读(1357) 回复(0)

首先介绍一下注册一个驱动的步骤: 1、定义一个platform_driver结构 2、初始化这个结构,指定其probe、remove等函数,并初始化其中的driver变量 3、实现其probe、remove等函数 看platform_driver结构,定义于include/linux/platform_device.h文件中: struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); i...

by gaofei8530 - Linux文档专区 - 2009-11-05 10:39:33 阅读(683) 回复(0)

首先介绍一下注册一个驱动的步骤: 1、定义一个platform_driver结构 2、初始化这个结构,指定其probe、remove等函数,并初始化其中的driver变量 3、实现其probe、remove等函数 看platform_driver结构,定义于include/linux/platform_device.h文件中: struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); ...

by vector_leizi - Linux文档专区 - 2009-05-08 14:35:20 阅读(558) 回复(0)

首先介绍一下注册一个驱动的步骤: 1、定义一个platform_driver结构 2、初始化这个结构,指定其probe、remove等函数,并初始化其中的driver变量 3、实现其probe、remove等函数 看platform_driver结构,定义于include/linux/platform_device.h文件中: struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); i...

by nacichan - Linux文档专区 - 2008-09-10 00:08:35 阅读(853) 回复(0)
by kungetky - 移动操作系统 - 2011-12-21 08:41:38 阅读(812) 回复(0)

原文地址 http://blog.163.com/jk_new/blog/static/9954856220099130338200/ 从linux-2.6开始引入了一套新的驱动管理和注册机制:platform_device和platform_driver. linux中的大部分设备驱动,都可以使用该机制,设备用platform_device表示,驱动用platform_deriver进行注册。 platform是linux的一个虚拟的地址总线,主要是用来描述芯片的片内资源,它直接取片内地址进行资源读写。因此和内核相关性不大,象lcd,rtc,watchdog,uar...

by myview - Linux文档专区 - 2009-10-22 11:00:48 阅读(927) 回复(0)

紧接上面介绍的数据结构,介绍驱动程序的具体实现过程。 相信大家都知道module_init()这个宏。驱动模块加载的时候会调用这个宏。它接收一个函数为参数,作为它的参数的函数将会对上面提到的platform_driver进行处理。看一个实例:假如这里module_init要接收的参数为s3c2410_uda1341_init这个函数,下面是这个函数的定义: static int __init s3c2410_uda1341_init(void) { memzero(&input_stream, sizeof(audio_stre...

by yqliu29 - Linux文档专区 - 2008-07-06 09:22:45 阅读(677) 回复(0)

首先介绍一下注册一个驱动的步骤: 1、定义一个platform_driver结构 2、初始化这个结构,指定其probe、remove等函数,并初始化其中的driver变量 3、实现其probe、remove等函数 看platform_driver结构,定义于include/linux/platform_device.h文件中: struct platform_driver { int (*probe)(struct platform_device *); int (*remove)(struct platform_device *); void (*shutdown)(struct platform_device *); ...

by yqliu29 - Linux文档专区 - 2008-07-05 20:54:51 阅读(6685) 回复(0)