Linux Kernel设备驱动模型之 struct device

    xiaoxiao2021-03-25  96

    设备模型之设备类型: /*  * The type of device, "struct device" is embedded in. A class  * or bus can contain devices of different types  * like "partitions" and "disks", "mouse" and "event".  * This identifies the device type and carries type-specific  * information, equivalent to the kobj_type of a kobject.  * If "name" is specified, the uevent will contain it in  * the DEVTYPE variable.  */ struct device_type {  const char *name;  const struct attribute_group **groups;  int (*uevent)(struct device *dev, struct kobj_uevent_env *env);  char *(*devnode)(struct device *dev, umode_t *mode,     kuid_t *uid, kgid_t *gid);  void (*release)(struct device *dev);

     const struct dev_pm_ops *pm; };

         
    转载请注明原文地址: https://ju.6miu.com/read-15595.html

    最新回复(0)