Linux Kernel设备驱动模型之 struct subsys_private
2017-03-12 12:28
375 查看
子系统描述:
/**
* struct subsys_private - structure to hold the private to the driver core portions of the bus_type/class structure.
*
* @subsys - the struct kset that defines this subsystem
* @devices_kset - the subsystem's 'devices' directory
* @interfaces - list of subsystem interfaces associated
* @mutex - protect the devices, and interfaces lists.
*
* @drivers_kset - the list of drivers associated
* @klist_devices - the klist to iterate over the @devices_kset
* @klist_drivers - the klist to iterate over the @drivers_kset
* @bus_notifier - the bus notifier list for anything that cares about things
* on this bus.
* @bus - pointer back to the struct bus_type that this structure is associated
* with.
*
* @glue_dirs - "glue" directory to put in-between the parent device to
* avoid namespace conflicts
* @class - pointer back to the struct class that this structure is associated
* with.
*
* This structure is the one that is the actual kobject allowing struct
* bus_type/class to be statically allocated safely. Nothing outside of the
* driver core should ever touch these fields.
*/
struct subsys_private {
struct kset subsys;
struct kset *devices_kset;
struct list_head interfaces;
struct mutex mutex;
struct kset *drivers_kset;
struct klist klist_devices;
struct klist klist_drivers;
struct blocking_notifier_head bus_notifier;
unsigned int drivers_autoprobe:1;
struct bus_type *bus;
struct kset glue_dirs;
struct class *class;
};
相关文章推荐
- Linux Kernel设备驱动模型之struct device_private
- Linux Kernel设备驱动模型之 struct driver_private
- Linux Kernel设备驱动模型之struct kobj_type
- Linux Kernel设备驱动模型之struct kobj_attribute
- Linux Kernel设备驱动模型之 struct device_node
- Linux Kernel设备驱动模型之 struct bus_type
- Linux Kernel设备驱动模型之 struct device_type
- Linux Kernel设备驱动模型之 struct device_driver
- Linux Kernel设备驱动模型之struct kset
- Linux Kernel设备驱动模型之CPU相关初始化
- Linux Kernel设备驱动模型之CPU接口注册
- Linux Kernel设备驱动模型之class 初始化
- Linux Kernel设备驱动模型之class 查找设备
- Linux Kernel设备驱动模型之设备注册
- Linux kernel驱动相关抽象概念及其实现 之“linux设备模型kobject,kset,ktype”
- Linux Kernel设备驱动模型之 设备添加
- Linux Kernel设备驱动模型之class 接口注册
- Linux Kernel设备驱动模型之设备初始化
- Linux Kernel设备驱动模型之 总线注册
- Linux Kernel设备驱动模型之class注册