既然有了usbhid,为什么还需要usbkbd驱动呢?

既然有了usbhid,为什么还需要usbkbd驱动呢?

我发现默认情况下控制我的USB键盘的是usbhid。我通过做发现了它rmmod usbhid。当我删除 usbhid 时,USB 键盘停止工作。请注意,usbkbd 尚未插入。然后我插入usbkbd,然后键盘又开始工作了。如果键盘可以由通用驱动程序 - usbhid 处理 - 那么为什么我们需要单独的 usbkbd?

答案1

内核文档中有答案:

3.1.2 usbmouse
~~~~~~~~~~~~~~
For embedded systems, for mice with broken HID descriptors and just any
other use when the big usbhid wouldn't be a good choice, there is the
usbmouse driver. It handles USB mice only. It uses a simpler HIDBP
protocol. This also means the mice must support this simpler protocol. Not
all do. If you don't have any strong reason to use this module, use usbhid
instead.

3.1.3 usbkbd
~~~~~~~~~~~~
Much like usbmouse, this module talks to keyboards with a simplified
HIDBP protocol. It's smaller, but doesn't support any extra special keys.
Use usbhid instead if there isn't any special reason to use this.

Documentation/input/input.txt

相关内容