int class_simple_set_hotplug(struct class_simple *cs, int (*hotplug) (struct class_device *dev, char **envp, int num_envp, crah *buffer, int buffer_size));
void class_simple_device_remove(dev_t dev);
完整的类接口
管理类
struct class
char *name;
struct class_attribute *class_attrs;
struct class_device_attribute *class_dev_attrs;
int (*hotplug) (struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size);
void (*release) (struct class_device *dev);
void (*class_release) (struct class *class);
int class_register(struct class *cls);
void class_unregister(struct class *cls);
struct class_attribute
struct attribute attr;
ssize_t (*show) (struct class *cls, char *buf);
ssize (*store) (struct class *cls, const char *buf, size_t count);
CLASS_ATTR(name, mode, show, store);
int class_create_file(struct class *cls, const struct class_attribute *attr);
void class_remove_file(struct class *cls, const struct class_attribute *attr);
类设备
strict class_device
struct kobject kobj;
struct class *class;
struct device *dev;
void *class_data;
char class_id[BUS_ID_SIZE];
int class_device_register(struct class_device *cd);