一.sysfs简介1.sysfs就是利用VFS的接口去读写kobject的层次结构,建立起来的文件系统.其更新与删除是那些xxx_register()/unregister()做的事 情.从sysfs中读写就相当于从kobject层提取数据.每当新增一个kobject结构时,就会在sysfs中增加一个目录.kobject对应的是文件 夹,attribute对应的是该文件夹下的文件.它是一个简单的文件系统,不涉及任何硬件驱动.sysfs来源于设备的层次结构,读sysfs文件就是动态地从设备树中寻找…