Input device driver

valdis.kletnieks at valdis.kletnieks at
Fri Sep 29 19:09:03 EDT 2017

On Fri, 29 Sep 2017 19:38:49 -0300, "Bruno E. O. Meneguele" said:

> 2) I'm using a USB keyboard as the testing device, and TBH I got
> confused if I could actually use the input subsystem for that or I
> _should_ use HID instead (considering the keyboard is HID compliant).

Step 0: Decide if you're writing an interrupt handling driver, a USB driver, or
an HID driver - the three live at different levels of abstraction, and
confusing them will also confuse both you and your kernel.

Step 1: Whichever level you decide on, your kernel probably already has a
driver that will gladly grab onto a USB keyboard at that level.  Find out how
to tell your kernel to not grab the device, as sharing a device between two
drivers never works out well, no matter what abstraction you're using.

Step 2: Take a backup of your system, just in case (which you should be doing
*anyhow* - neither spinning oxide disks nor flash-based drives are perfect).

Step 3: Write the driver....
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : 

More information about the Kernelnewbies mailing list