完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
struct bus_type {
const char *name; // 总线名 struct bus_attribute *bus_attrs; // 总线属性 struct device_attribute *dev_attrs; struct driver_attribute *drv_attrs; int (*match)(struct device *dev, struct device_driver *drv); // 匹配方法 int (*uevent)(struct device *dev, struct kobj_uevent_env *env); int (*probe)(struct device *dev); int (*remove)(struct device *dev); void (*shutdown)(struct device *dev); int (*suspend)(struct device *dev, pm_message_t state); int (*resume)(struct device *dev); const struct dev_pm_ops *pm; struct subsys_private *p;
const char *name; // 总线名
struct bus_attribute *bus_attrs; // 总线属性
struct device_attribute *dev_attrs;
struct driver_attribute *drv_attrs;
int (*match)(struct device *dev, struct device_driver *drv); // 匹配方法
int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
int (*probe)(struct device *dev);
int (*remove)(struct device *dev);
void (*shutdown)(struct device *dev);
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
const struct dev_pm_ops *pm;
struct subsys_private *p;
};
struct device { struct device *parent; // 当前设备的父类 struct device_private *p; struct kobject kobj; const char *init_name; /* initial name of the device 设备名*/ const struct device_type *type; struct mutex mutex; struct bus_type *bus; /* type of bus device is on 设备所在的总线*// struct device_driver *driver; /* which driver has allocated this device ,该对象中包含操作设备的的方法*/ void *platform_data; /* Platform specific data, device core doesn't touch it,私有平台数据,给用户使用 */ struct dev_pm_info power; struct dev_power_domain *pwr_domain; /* arch specific additions */ struct dev_archdata archdata; struct device_node *of_node; /* associated device tree node */ dev_t devt; /* dev_t, creates the sysfs "dev" */ spinlock_t devres_lock; struct list_head devres_head; struct klist_node knode_class; struct class *class; const struct attribute_group **groups; /* optional groups */ void (*release)(struct device *dev); //当设备的最后一个引用被删除时,调用该函数 };
struct device {
struct device *parent; // 当前设备的父类
struct device_private *p;
struct kobject kobj;
const char *init_name; /* initial name of the device 设备名*/
const struct device_type *type;
struct mutex mutex;
struct bus_type *bus; /* type of bus device is on 设备所在的总线*//
struct device_driver *driver; /* which driver has allocated this device ,该对象中包含操作设备的的方法*/
void *platform_data; /* Platform specific data, device core doesn't touch it,私有平台数据,给用户使用 */
struct dev_pm_info power;
struct dev_power_domain *pwr_domain;
/* arch specific additions */
struct dev_archdata archdata;
struct device_node *of_node; /* associated device tree node */
dev_t devt; /* dev_t, creates the sysfs "dev" */
spinlock_t devres_lock;
struct list_head devres_head;
struct klist_node knode_class;
struct class *class;
const struct attribute_group **groups; /* optional groups */
void (*release)(struct device *dev); //当设备的最后一个引用被删除时,调用该函数
const char *name; // 驱动名字 struct bus_type *bus; // 所属总线 struct module *owner; const char *mod_name; /* used for built-in modules */ bool suppress_bind_attrs; /* disables bind/unbind via sysfs */ const struct of_device_id *of_match_table;// 设备id表,表示该驱动支持哪些型号的设备 int (*probe) (struct device *dev); // 当设备和驱动匹配的时候执行的方法 int (*remove) (struct device *dev); void (*shutdown) (struct device *dev); int (*suspend) (struct device *dev, pm_message_t state); int (*resume) (struct device *dev); const struct attribute_group **groups; const struct dev_pm_ops *pm; struct driver_private *p; };
const char *name; // 驱动名字
struct bus_type *bus; // 所属总线
struct module *owner;
const char *mod_name; /* used for built-in modules */
bool suppress_bind_attrs; /* disables bind/unbind via sysfs */
const struct of_device_id *of_match_table;// 设备id表,表示该驱动支持哪些型号的设备
int (*probe) (struct device *dev); // 当设备和驱动匹配的时候执行的方法
int (*remove) (struct device *dev);
void (*shutdown) (struct device *dev);
int (*suspend) (struct device *dev, pm_message_t state);
int (*resume) (struct device *dev);
const struct attribute_group **groups;
struct driver_private *p;
只有小组成员才能发言,加入小组>>
82个成员聚集在这个小组
Qualcomm_Snapdragon_VR_SDK SvrPlugin脚本简介(1)
1689 浏览 0 评论
【DragonBoard 410c试用体验】之OpenCV中canny算子边缘检测
8987 浏览 0 评论
【DragonBoard 410c】汇总帖(2016.10.25更新)
36075 浏览 2 评论
电子发烧友网
电子发烧友论坛
查看 »
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 00:47 , Processed in 0.725183 second(s), Total 45, Slave 34 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com