总线描述
struct busy_type
{ struct bus_attribute,
match,
uevent,....
总线属性
struct busy_attribute
{ struct attribute attr;
show
store
初始化做两件事:
总线注册
bus_register(&my_bus_type)
创建属性文件
bus_create_file(struct bus_type *bus, struct bus_arrtibute *attr)
创建属性文件前需要定义bus_type 和 bus_arrtibute 结构
/sys/bus下看到创建的总线文件