1. usb匯流排
struct usb_bus ;
struct usb_bus ;
2. usb hub
struct usb_hub *status;
struct mutex status_mutex;
int error; //出錯標誌
int nerrors;
struct list_head event_list; //事件鍊錶
unsigned long event_bits[1];
unsigned long change_bits[1];
unsigned long busy_bits[1];
unsigned long removed_bits[1];
#if usb_maxchildren > 31
#error event_bits is too short!
#endif
struct usb_hub_descriptor *descriptor; //hub描述符
struct usb_tt tt;
unsigned ma_per_port; //每個埠電流量
unsigned limited_power:1;
unsigned quiescing:1;
unsigned disconnected:1;
unsigned has_indicators:1;
u8 indicator[usb_maxchildren];
struct delayed_work leds;
struct delayed_work init_work;
void **port_owners;
};
struct usb_hub *status;
struct mutex status_mutex;
int error; //出錯標誌
int nerrors;
struct list_head event_list; //事件鍊錶
unsigned long event_bits[1];
unsigned long change_bits[1];
unsigned long busy_bits[1];
unsigned long removed_bits[1];
#if usb_maxchildren > 31
#error event_bits is too short!
#endif
struct usb_hub_descriptor *descriptor; //hub描述符
struct usb_tt tt;
unsigned ma_per_port; //每個埠電流量
unsigned limited_power:1;
unsigned quiescing:1;
unsigned disconnected:1;
unsigned has_indicators:1;
u8 indicator[usb_maxchildren];
struct delayed_work leds;
struct delayed_work init_work;
void **port_owners;
};
3. usb主控器驅動
[cpp]view plain
copy
print?
struct hc_driver ;
struct hc_driver ;
4. usb主控器裝置
struct usb_hcd ;
struct usb_hcd ;
5. usb裝置驅動
struct usb_driver ;
struct usb_driver ;
6. usb裝置
struct usb_device ;
struct usb_device ;
7. usb介面
[cpp]view plain
copy
print?
struct usb_inte***ce ;
struct usb_inte***ce ;
8. usb請求塊urb
struct urb ;
struct urb ;
9. usb裝置id
struct usb_device_id ;
struct usb_device_id ;
1.usb裝置描述符
struct usb_device_descriptor __attribute__ ((packed));
struct usb_device_descriptor __attribute__ ((packed));
2.usb配置描述符
struct usb_config_descriptor __attribute__ ((packed));
struct usb_config_descriptor __attribute__ ((packed));
3.usb端點描述符
struct usb_endpoint_descriptor __attribute__ ((packed));
struct usb_endpoint_descriptor __attribute__ ((packed));
4.usb介面描述符
struct usb_inte***ce_descriptor __attribute__ ((packed));
USB 梳理USB子系統
看了很久的usb子系統了,還是霧濛濛的,現在梳理一下。首先從bus入手,在core下面定義了struct bus type usb bus type,這就是usb的bus上的裝置與驅動通用的乙個結構體。首先看driver,api主要在core driver.c裡,註冊usb bus type的,主要...
USB系統結構
usb系統結構 1.usb系統拓撲結構 這個是usb系統的拓撲圖,4個部分構成 usb主機控制器,根集線器,集線器,裝置。其中root hub與usb主機控制器是繫結在一起的。node代表usb裝置,廣義上講hub也是一種usb裝置。一根usb匯流排最多可掛127個裝置。常見的usb主控制器 ohc...
kobject,kset,子系統層次結構
kobject,kset,子系統層次結構 核心通常用kobject 結構將各個物件連線起來組成乙個分層的結構體系。parent 是指向另外乙個kobject 結構 分層結構中上一層的節點 的指標,主要用途是在 sysfs 層次中定位物件.乙個 kset 是嵌入到相同型別結構的 kobject 的集合...