linux 运行时 usb-mouse 的运行流程

交互时做了什么
  • 中断何时会发生
插入设备
数据来到
  • 中断发生时
usb_hcd_irq
	hcd->driver->irq(hcd) // ohci_irq (drivers/usb/host/ohci-hcd.c 提供的 struct hc_driver ohci_hc_driver 结构体中的 irq成员)
										  // xhci_irq drivers/usb/host/xhci.c 中的 struct hc_driver xhci_hc_driver 结构体的 irq 成员

A. usb_hcd_irq
	*hci_irq
		tasklet 唤醒底半部

B .底半部的顶层函数
	...
		hub_irq/usb_mouse_irq

C.1 功能函数hub_irq
	唤醒hub_thread 让你检测设备// 从而创建设备device 和 接口device
C.2 功能函数 usb_mouse_irq
	上报给input子系统数据
C.3 ...

  • 9
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值