Chinaunix首页 | 论坛 | 博客
  • 博客访问: 177887
  • 博文数量: 34
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 374
  • 用 户 组: 普通用户
  • 注册时间: 2013-10-30 10:46
文章分类

全部博文(34)

文章存档

2018年(5)

2015年(13)

2014年(13)

2013年(3)

我的朋友

分类: 嵌入式

2015-06-12 15:37:22

linux源码version:linux-4.0.4 

了解Linux内核关于usb的源码,从usb驱动目录开始了解: ls drivers/usb/ -l
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 atm
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 c67x00
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 chipidea
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 class
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 common
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 core
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 dwc2
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 dwc3
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 early
drwxrwxr-x 5 lxl lxl  4096 May 17 09:55 gadget
drwxrwxr-x 3 lxl lxl  4096 May 17 09:55 host
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 image
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 isp1760
-rw-rw-r-- 1 lxl lxl  4698 May 17 09:55 Kconfig
-rw-rw-r-- 1 lxl lxl  1687 May 17 09:55 Makefile
drwxrwxr-x 3 lxl lxl  4096 May 17 09:55 misc
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 mon
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 musb
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 phy
-rw-rw-r-- 1 lxl lxl  2427 May 17 09:55 README
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 renesas_usbhs
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 serial
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 storage
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 usbip
-rw-rw-r-- 1 lxl lxl 16184 May 17 09:55 usb-skeleton.c
drwxrwxr-x 2 lxl lxl  4096 May 17 09:55 wusbcore
这个list中共有四个文档:Kconfig、Makefile、 README 、usb-skeleton.c
其中帮助理解drivers/usb/各个文件目录的用途 的三个文件:drivers/usb/README 、drivers/usb/Makefile、 drivers/usb/Kconfig
drivers/usb/目录list 的 README文件 可以了解drivers/usb/ 个目录中文件用途。

README 内容:
core/ - This is for the core USB host code, including the usbfs files and the hub class driver ("hub_wq").
          usb主机内核代码 包含usbfs files 和 hub类驱动

host/ - This is for USB host controller drivers.  This includes UHCI, OHCI, EHCI, and others that might be used with more specialized "embedded" systems.
          usb host controller 驱动 ,包含  UHCI, OHCI, EHCI 和其他可能被专用在嵌入式系统中的

gadget/ - This is for USB peripheral controller drivers and the various gadget drivers which talk to them.
            USB外设controller驱动 和各类和外设通信的装置

Individual USB driver directories.  A new driver should be added to the first subdirectory in the list below that it fits into.
个别usb驱动目录:一个新的驱动应该被添加下列在对应的的子目录里

image/ - This is for still image drivers, like scanners or digital cameras.
           这个目录是图象驱动目录,例如:扫描仪、数码相机。

../input/ - This is for any driver that uses the input subsystem, like keyboard, mice, touchscreens, tablets, etc.
             这个目录给使用输入子系统的设备驱动使用,例如:键盘,鼠标,触摸屏等等。

../media/ - This is for multimedia drivers, like video cameras,radios, and any other drivers that talk to the v4l subsystem.
             这个目录放置多媒体驱动,例如:录像机,无线设备,和其他需要和v4l 通信的设备驱动。

../net/ - This is for network drivers.
            这个目录放置网络驱动。

serial/ - This is for USB to serial drivers.
           这个目录放置 usb转串口驱动

storage/ - This is for USB mass-storage drivers.
            这个目录放置 usb 批量存储驱动。

class/ - This is for all USB device drivers that do not fit into any of the above categories, and work for a range of USB Class specified devices. 
           这个目录存放 不适合上述目录且基于usb类的指定设备的 USB device drivers ,

misc/ - This is for all USB device drivers that do not fit into any of the above categories.
           这个目录存放不适合上述任何设备的驱动。





阅读(2333) | 评论(0) | 转发(2) |
给主人留下些什么吧!~~