REFERENCE DOCUMENT..................................................................................................................1
1 设备模型概述.........................................................................................................................................2
目的........................................................................................................................................................2
任务........................................................................................................................................................2
图例........................................................................................................................................................3
2 设备模型结构.........................................................................................................................................4
KOBJECT..................................................................................................................................................4
KSET........................................................................................................................................................6
ATTRIBUTE..............................................................................................................................................6
设备........................................................................................................................................................7
数据结构
...........................................................................................................................................7
方法
.................................................................................................................................................10
驱动......................................................................................................................................................12
数据结构
.........................................................................................................................................12
方法
.................................................................................................................................................13
总线......................................................................................................................................................14
数据结构
.........................................................................................................................................14
方法
.................................................................................................................................................15
类..........................................................................................................................................................17
数据结构
.........................................................................................................................................17
方法
.................................................................................................................................................18
3 SYSFS 文件系统..................................................................................................................................19
SYSFS 目录结构...................................................................................................................................19
深入理解 SYSFS...................................................................................................................................20
SYSFS 文件 OPEN 流程.........................................................................................................................24
SYSFS 文件 READ/WRITE 流程..............................................................................................................25
4 UEVENT 事件.....................................................................................................................................27
UEVENT 简介........................................................................................................................................27
UEVENT 处理流程................................................................................................................................27
5 UDEV 活动设备管理...........................................................................................................................32
UDEV 简介............................................................................................................................................32
UDEV 处理 UEVENT 的简单流程.........................................................................................................33
6 遗留问题分析.......................................................................................................................................34