- 博客(14)
- 资源 (2)
- 收藏
- 关注
转载 linux Gsensor驱动(bma250为例子)
1 Gsensor 驱动概述 本文以Bma250驱动为例子,详细介绍Gsensor设计的一个模板。 gsensor驱动在系统中的层次如下图所示:图中包含三个部分:hardware, driver, input:n Hardware:其实我们可以认为Gsensor也是一个I2C设备。整个Gsensor芯片分为两部分,一个是sensor传感器,另一个是co
2013-09-26 14:17:54
1122
转载 如何去写 Android init.rc
在 Android中使用启动脚本init.rc,可以在系统的初始化过程中进行一些简单的初始化操作。这个脚本被直接安装到目标系统的根文件系统中,被 init可执行程序解析。 init.rc是在init启动后被执行的启动脚本,其语法主要包含了以下内容:Commands:命令Actions: 动作Triggers:触发条件Services:服务Options: 选项Propert
2013-09-24 11:08:46
683
转载 linux之misc及使用misc创建字符设备
1:linux字符设备及udev 1.1字符设备字符设备就是:一个一个字节来进行访问的,不能对字符设备进行随机读写。简单字符设备创建实例如下:[cpp] view plaincopyprint?#include #include #include #include #include #include #inc
2013-09-23 19:31:19
987
转载 linux设备驱动第一个模块hello,world
Hello, World! 使用 /dev/hello_world现在我们将使用在/dev目录下的一个设备文件/dev/hello_world实现”Hello,world!” 。追述以前的日子,设备文件是通过MAKEDEV脚本调用mknod命令在/dev目录下产生的一个特定的文件,这个文件和设备是否运行在改机器上无关。 到后来设备文件使用了devfs,devfs在设备第一被
2013-09-23 19:12:22
810
转载 Linux driver model ----- platform
分类: 驱动相关 linuxstruct嵌入式api工作网络Platform Device and Drivers从我们可以了解Platform bus上面的驱动模型接口:platform_device,platform_driver。和PCI和USB这些大结构的总线不同,虚拟总线Platform bus使用最小结构来集成SOC processer上的各种外设,或者各种
2013-09-05 16:51:20
601
转载 Linux Platform Device and Driver
分类: linux内核 linuxstructcnullmoduleresources从Linux 2.6起引入了一套新的驱动管理和注册机制:Platform_device和Platform_driver。Linux中大部分的设备驱动,都可以使用这套机制, 设备用Platform_device表示,驱动用Platform_driver进行注册。 Linux
2013-09-05 16:47:43
897
转载 Linux驱动中,probe函数何时被调用
Linux驱动中,probe函数何时被调用分类: linux内核 驱动相关 linuxstructnullmethodseachtable最近看到linux的设备驱动模型,关于Kobject、Kset等还不是很清淅。看到了struct device_driver这个结构时,想到一个问题:它的初始化函数到底在哪里调用呢?以前搞PCI驱动时用pci驱
2013-09-05 16:45:20
667
转载 platform设备驱动
1.platform总线、设备与驱动 在Linux 2.6的设备驱动模型中,关心总线、设备和驱动这3个实体,总线将设备和驱动绑定。在系统每注册一个设备的时候,会寻找与之匹配的驱动;相反的,在系统每注册一个驱动的时候,会寻找与之匹配的设备,而匹配由总线完成。 一个现实的Linux设备和驱动通常都需要挂接在一种总线上,对于本身依附于PCI、USB、I2 C、SPI等
2013-09-05 16:45:10
703
转载 platform _device和platform_driver注册过程
platform_device_register()注册过程------------------------------------/* arch/arm/mach-s3c2410/mach-smdk2410.c */struct platform_device s3c_device_i2c = { .name = "s
2013-09-05 16:42:52
653
转载 Linux驱动的platform机制
最近在看SPI、I2C这样简单点的总线驱动程序,从Linux2.6起,内核引入了一套新的驱动管理和注册机制:Platform_device和Platform_driver.现在Linux中大部分的设备驱动都可以使用这套机制,总线为platform_bus,设备用platform_device表示,驱动用platform_driver进行注册。 Linux的这种platform drive
2013-09-05 16:03:55
718
转载 设备模型、设备与驱动关联的全过程分析 platform_device platform_driver driver bus关系
[cpp] view plaincopy1. 平台驱动注册过程 具体的目录如下: 关于设备模型、设备与驱动关联的全过程分析。... 1 1.1 at91_i2c_init()函数... 1 1.2 platform_driver_register()函数... 2
2013-09-05 10:58:51
792
转载 关于platform_driver 是如何匹配 platform_device的和如何调用到platform_driver中的probe函数的研究
在linux中platform平台驱动又三大部分组成,第一是bus、第二是驱动、第三是设备。 第一总线也就是platform_bus,总线也是一种特殊的device,到底层下面还是要调用device_register来注册该总线设备,然后是用来注册总线的属性结构体 bus_type(platform_bus_type),至此platform平台的总线已经准备好。具体介绍可以看
2013-09-05 10:56:16
907
转载 Linux驱动之Platform Driver
Linux驱动之Platform Driver # Platform Driver 平台驱动 Linux中的所有设备驱动都需要注册到系统平台下,这此操作由platform_device.h中定义的一组函数完成.我们先来看看struct platform_driver这个结构体:struct platform_driver {
2013-09-05 10:55:25
622
转载 从platform驱动看驱动模型
从platform_driver看驱动模型,一. device kset 和 bus kset根据sys的结构图,我们知道,在sysfs中,首先注册的是bus,devices而buses_init bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);该函数调用Kset_crea
2013-09-05 10:53:57
757
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人