westwind

1) kobject_add-----sysfs\'s dir

2) 位置与kobject->parent有关

3) attribute-------sysfs\'s file

4) kobject_type-----attribute 

         |--------attribute\'s operation= sysfs_ops---  show

                                                                                |-- store

5) nondefault attribute  增加自己需要的属性   

                    |----------int sysfs_create_file(struct kobject *kobj, struct attribute *attr);

                    |----------int sysfs_remove_file(struct kobject *kobj, struct attribute *attr);

6) binary attribute 用户空间和设备传输数据

       |----------int sysfs_create_bin_file(struct kobject *kobj, struct bin_attribute *attr); 

       |----------int sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); 

7) symbolic link  建立不同目录间的联系

       |----------int sysfs_create_link(struct kobject *kobj, struct kobject *target, char *name); 

                    |----------void sysfs_remove_link(struct kobject *kobj, char *name); 

分类:

技术点:

相关文章:

  • 2021-04-24
  • 2021-12-15
  • 2022-01-08
  • 2022-01-10
  • 2021-07-14
猜你喜欢
  • 2021-04-08
  • 2021-06-07
  • 2021-09-07
  • 2021-07-13
  • 2022-01-17
相关资源
相似解决方案