Linux Device Model

来源:互联网 发布:淘宝网电脑版登陆网址 编辑:程序博客网 时间:2024/06/05 12:10

to be continued ....

digraph Device_Model {graph [rankdir = "LR", bgcolor = "white:lightblue", style="filled", gradientangle = 270];node [fontsize = "16", shape = "ellipse", style="filled", gradientangle=90];edge [];/*   The kobject introduces basic object properties.   In sysfs, kobjects are the individual directories in the filesystem.*/"kobject" [label = "<struct>struct kobject |     name | ... |     <entry>list_head entry |    <parent>kobject *parent |    <kset>kset *kset|     <ktype>kobj_type *ktype |    <sd>sysfs_dirent *sd|    <kref>kref kref | ... "shape = "record"gradientangle="90"fillcolor = "yellow:green;0.1" ];"kobject2" [label = "<struct>struct kobject |     name | ... |     <entry>list_head entry |    <parent>kobject *parent |    <kset>kset *kset|     <ktype>kobj_type *ktype |    <sd>sysfs_dirent *sd|    <kref>kref kref | ... "shape = "record"gradientangle="90"fillcolor = "yellow:green;0.1" ];/*  the building block of sysfs hierarchy. Each and every sysfs node is represented by single sysfs_dirent.*/"sysfs_dirent" [label = "<struct>struct sysfs_dirent |     s_name |    <s_parent>sysfs_dirent *s_parent |     <s_sibling>sysfs_dirent *s_sibling |    { | {sysfs_elem_dir s_dir | sysfs_elem_symlink s_symlink | sysfs_elem_attr s_attr | sysfs_elem_bin_attr s_bin_attr }} |    <s_flags>unsigned int s_flags|     <s_mode>unsigned short s_mode |    <s_ino>ino_t s_ino|    <s_iattr>sysfs_inode_attrs *s_iattr| ... "shape = "record"gradientangle="90"fillcolor = "pink:green;0.08" ];/*  kobj_type describes default behavior for a family of kobjects. Kobjects of the same "type" point at the same ktype structure, thus sharing the same behavior.*/"kobj_type" [label = "<struct>struct kobj_type |     release() |    <sysfs_ops>sysfs_ops *sysfs_ops |     <default_attrs>attribute **default_attrs"shape = "record"gradientangle="90"fillcolor = "pink:green;0.24" ];/*  struct kset - a set of kobjects of a specific type, belonging to a specific subsystem.  Ksets group related kernel objects together, whereas ktypes enable kernel objects(functionally related or not) to share common operations. The distinction is kept to allow kobjects of identical ktypes to be grouped into different ksets.  kobj is a kobject representing the base classs for this set.*/"kset" [label = "<struct>struct kset |     <list>list_head list |    <list_lock>spinlock_t list_lock |    <kobj>kobject kobj |    <uevent_ops>kset_uevent_ops *uevent_ops"shape = "record"gradientangle="90"fillcolor = "pink:green;0.2" ];"sysfs_ops" [label = "<struct>struct sysfs_ops |     show() |    store()"shape = "record"gradientangle="90"fillcolor = "yellow:green;0.33" ];"attribute" [label = "<struct>struct attribute |     name |    module *owner |    mode_t mode"shape = "record"gradientangle="90"fillcolor = "yellow:green;0.26" ];//"kobject" : parent -> "kobject" : struct[taillabel=parent, style=dashed]"kobject" : parent -> "kset" : kobj[taillabel="parent\/sysfs", color=green]"kobject" : sd -> "sysfs_dirent" : struct"kobject" : ktype -> "kobj_type" : struct"kobject" : kset -> "kset" : struct"kobj_type" : sysfs_ops -> "sysfs_ops" : struct"kobj_type" : default_attrs -> "attribute" : struct"sysfs_dirent" : s_parent -> "sysfs_dirent" : struct [taillabel=parent, style=dashed]"sysfs_dirent" : s_sibling -> "sysfs_dirent" : struct [taillabel=sibling, style=dashed]//"kset" : list -> "kobject" : struct [style=dashed]//"kset" : kobj -> "kobject" : struct [style=dashed]"kset" : list -> "kobject" : entry [style=dashed, dir=both, color=red]"kobject2" : entry -> "kobject" : entry [style=dashed, dir=both, color=red]"kset" : list -> "kobject2" : entry [style=dashed, dir=both, color=red]}digraph Bus {graph [rankdir = "LR", bgcolor = "white:lightblue", style="filled", gradientangle = 270];node [fontsize = "16", shape = "ellipse", style="filled", gradientangle=90];edge [];"bus_type" [label = "<struct>struct bus_type |     name |    <bus_attrs>bus_attribute *bus_attrs |    <dev_attrs>device_attribute *dev_attrs |    <drv_attrs>driver_attribute *drv_attrs|     match() |    uevent()|    probe() |     remove() |    shutdown() |    suspend() |    resume() |    <pm>dev_pm_ops *pm |    <p>bus_type_private *p "shape = "record"gradientangle="90"fillcolor = "pink:green;0.07" ];"bus_type_private" [label = "<struct>struct bus_type_private |     <subsys>kset subsys |    <drivers_kset>kset *drivers_kset |     <devices_kset>kset *devices_kset |    <klist_devices>klist klist_devices |    <klist_drivers>klist klist_drivers |    <bus_notifier>blocking_notifier_head bus_notifier |    <drivers_autoprobe>drivers_autoprobe:1 |    <bus>bus_type *bus "shape = "record"gradientangle="90"fillcolor = "yellow:green;0.11" ];"kset" [label = "<struct>struct kset |     <list>list_head list |    <list_lock>spinlock_t list_lock |    <kobj>kobject kobj |    <uevent_ops>kset_uevent_ops *uevent_ops"shape = "record"gradientangle="90"fillcolor = "pink:green;0.2" ];"klist" [label = "<struct>struct klist |     spinlock_t k_lock |    <k_list>list_head k_list |    get() |    put()"shape = "record"gradientangle="90"fillcolor = "pink:green;0.2" ];"klist_node" [label = "<struct>struct klist_node |     void *n_klist |    <k_list>list_head k_list |    list_head n_node |    kref n_ref"shape = "record"gradientangle="90"fillcolor = "pink:green;0.2" ];"device" [label = "<struct>struct device |     <parent>device *parent |    <p>device_private *p |    <kobj>kobject kobj |    const char *init_name |    <type>device_type *type |    <bus>bus_type *bus |    <driver>device_driver *driver | ...|    <knode_class>klist_node knode_class |    <class>class *class |    release() | ..."shape = "record"gradientangle="90"fillcolor = "yellow:green;0.08" ];"device_private" [label = "<struct>struct device_private |     <klist_children>klist klist_children |    <knode_parent>klist_node knode_parent |    <knode_driver>klist_node knode_driver |    <knode_bus>klist_node knode_bus |    void *driver_data |    <device>device *device"shape = "record"gradientangle="90"fillcolor = "pink:green;0.14" ];"driver_private" [label = "<struct>struct driver_private |     <kobj>kobject kobj |    <klist_devices>klist klist_devices |    <knode_bus>klist_node knode_bus |    <mkobj>module_kobject *mkobj |    <driver>device_driver *driver"shape = "record"gradientangle="90"fillcolor = "pink:green;0.16" ];"class_private" [label = "<struct>struct class_private |     <class_subsys>kset class_subsys |    <class_devices>klist class_devices |    <class_interfaces>list_head class_interfaces |    <class_dirs>kset class_dirs |    <class_mutex>mutex class_mutex |    <class>class *class"shape = "record"gradientangle="90"fillcolor = "pink:green;0.145" ];"class" [label = "<struct>struct class |     const char *name |    module *owner |    <class_attrs>class_attribute *class_attrs |    <dev_attrs>device_attribute *dev_attrs |    <dev_kobj>kobject *dev_kobj |    dev_uevent() |    devnode() |    class_release() |    dev_release() |    suspend() |    resume() |        <pm>dev_pm_ops *pm |    <p>class_private *p"shape = "record"gradientangle="90"fillcolor = "pink:green;0.07" ];"device_type" [label = "<struct>struct device_type |     const char *name |    <groups>attribute_group **groups |    uevent() |    devnode() |    release() |    <pm>dev_pm_ops *pm"shape = "record"gradientangle="90"fillcolor = "pink:green;0.14" ];"device_driver" [label = "<struct>struct device_driver |     const char *name |    <bus>bus_type *bus |    module *owner |    const char *mod_name |    bool suppress_bind_attrs |    probe() |    remove() |    shutdown() |    suspend() |    resume() |    <groups>attribute_group **groups |    <pm>dev_pm_ops *pm |    <p>driver_private *p"shape = "record"gradientangle="90"fillcolor = "pink:green;0.07" ];"bus_type" : p -> "bus_type_private" : struct"bus_type_private" : bus -> "bus_type" : struct"bus_type_private" : subsys -> "kset" : struct"bus_type_private" : drivers_kset -> "kset" : struct"bus_type_private" : devices_kset -> "kset" : struct"bus_type_private" : klist_devices -> "klist" : struct"bus_type_private" : klist_drivers -> "klist" : struct"device" : bus -> "bus_type" : struct"device" : knode_class -> "klist_node" : struct [style=dashed]"device" : parent -> "device" : struct [style=dashed]"device" : p -> "device_private" : struct"device" : type -> "device_type" : struct"device" : driver -> "device_driver" : struct"device" : class -> "class" : struct"device_private" : device -> "device" : struct"device_driver" : bus -> "bus_type" : struct"device_driver" : p -> "driver_private" : struct"device_driver" : knode_bus -> "klist_node" : struct [style=dashed]"class" : p -> "class_private" : struct"class_private" : class -> "class" : struct} 




References:

http://www.cnblogs.com/xiaojiang1025/p/6193959.html





原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 魅蓝3开不了机怎么办 手机不支持联通4g网络怎么办 华为手机出现emui界面怎么办 华为畅玩4x内存不足怎么办 手机电源键掉了怎么办 手机电源键坏了怎么办 小米5s听筒声音小怎么办 荣耀8电源键失灵怎么办 华为荣耀3c卡怎么办 大王卡是2g网络怎么办 联通停用2g副卡怎么办 华为荣耀8忘记解锁密码怎么办 华为手机内存满了怎么办 华为手机无限重启怎么办 华为3c重启怎么办 荣耀6 无限重启怎么办 手机进水无法开机了怎么办 华为手机不停重启怎么办 华为手机反复重启怎么办 酷派电池不耐用怎么办 美图手机充电慢怎么办 酷派b770太卡怎么办 酷派手机出现无命令怎么办 华为荣耀4x卡怎么办 华为手机图案解锁忘了怎么办 xp电脑读不起u盘怎么办 在外国玩王者卡怎么办 华为p7忘记解锁密码怎么办 华为荣耀4x存储空间不足怎么办 红米4a内存不够怎么办 华为h60开不了机怎么办 华为荣耀4c内存不足怎么办 华为4c运行内存不足怎么办 华为手机总是显示内存不足怎么办 华为荣耀4x畅玩版内存不足怎么办 三星手机忘了解锁密码怎么办 荣耀8密码忘了怎么办 华为4x开不了机怎么办 华为指纹和密码解锁解不开怎么办 华为荣耀5x死机怎么办 华为荣耀开不了机怎么办