MSM8953 core 3.0 usb otg USB 笔记

8953走的是dwc3-msm.c,8909走的是phy-msm-usb.c

// device 切 host 流程

usbid_change_handler

dwc3_msm_power_set_property_usb

+ POWER_SUPPLY_PROP_USB_OTG

+ queue_delayed_work(mdwc->dwc3_wq, &mdwc->resume_work, 0);

 

dwc3_resume_work()

--> dwc3_otg_sm_work()

----> OTG_STATE_A_IDLE

----> dwc3_otg_start_host

------> platform_device_add

--------> device_add

----------> bus_probe_device

------------> device_attach

--------------> bus_for_each_drv

----------------> __device_attach

-----------------> driver_probe_device

------------------> platform_drv_probe

--------------------> xhci_plat_probe

 

xhci_plat_probe

--> usb_add_hcd

----> register_root_hub

------> usb_new_device

--------> usb_enumerate_device

--------> device_add

----------> bus_probe_device

------------> hub_probe

 

hub_probe

------> hub_configure

--------> hub_activate

----------> hub_init_func2

------------> hub_activate

--------------> kick_hub_wq

 

//插入usb 鼠标的流程

msm_dwc3_pwr_irq_thread

--> dwc3_pwr_event_handler

----> dwc3_otg_sm_work

------> pm_runtime_resume ---> xhci_resume

 

xhci_resume

hcd_resume_work //唤醒 root hub用

--> usb_remote_wakeup

----> hub_resume

------> hub_activate

--------> kick_hub_wq

 

--> hub_irq //普通的 hub 中断

----> kick_hub_wq

 

//切换到 host 模式和插入 usb 鼠标,都会调用的地方。

kick_hub_wq

--> hub_event

----> port_event

------> hub_port_connect_change

--------> hub_port_connect

----------> usb_new_device

你可能感兴趣的:(android)