sysfs 中的设备入口可有属性. 相关的结构是: struct device_attribute { struct attribute attr; ssize_t (*show)(struct device *dev, char *buf); ssize_t (*store)(struct device *dev, const char *buf, size_t count); }; 这些属性结构可在编译时建立, 使用这些宏: DEVICE_ATTR(name, mode, show, sto