- 论坛徽章:
- 0
|
本帖最后由 bijianing 于 2011-08-06 19:13 编辑
我研究课题需要开发一个温度传感器驱动
硬件是usb鼠标控制器+温度传感器,通过usb接到pc上。
我现在根据usb-skeleton.c,该了一下厂商id和产品id的定义,看看能不能加载我写的驱动模块。
结果没有被加载。
我的模块已经成功添加到系统:
模块名是sht11- $ grep sht11 /lib/modules/2.6.35.6-bjn/modules.*
- /lib/modules/2.6.35.6-bjn/modules.alias:alias usb:v1774p1001d*dc*dsc*dp*ic*isc*ip* sht11
- 匹配到二进制文件 /lib/modules/2.6.35.6-bjn/modules.alias.bin
- /lib/modules/2.6.35.6-bjn/modules.dep:extra/sht11.ko:
- 匹配到二进制文件 /lib/modules/2.6.35.6-bjn/modules.dep.bin
- /lib/modules/2.6.35.6-bjn/modules.usbmap:sht11 0x0003 0x1774 0x1001
复制代码 我感觉问题在这个usb的鼠标芯片上,lsusb结果是:
- Bus 002 Device 003: ID 1774:1001
- Device Descriptor:
- ......
- idVendor 0x1774
- idProduct 0x1001
- ......
- bNumConfigurations 1
- Configuration Descriptor:
- ......
- MaxPower 50mA
- Interface Descriptor:
- ......
- bNumEndpoints 1
- bInterfaceClass 3 Human Interface Device
- bInterfaceSubClass 0 No Subclass
- bInterfaceProtocol 0 None
- iInterface 0
- HID Device Descriptor:
- bLength 9
- bDescriptorType 33
- bcdHID 1.00
- bCountryCode 0 Not supported
- bNumDescriptors 1
- bDescriptorType 34 Report
- wDescriptorLength 70
- Report Descriptors:
- ** UNAVAILABLE **
- ......
复制代码 我的问题是:
1. 什么情况下内核根据厂商id,产品id来加载模块,
是不是bInterfaceClass=255(Vendor Specific Class)的时候,才根据厂商id,产品id来加载模块呢?
2. 根据那些文档会有相关的描述呢? |
|