USB driver using libusb
I have a homemade USB device that I'm learning how to make a driver for. I understand the difference between a kernel driver and a userspace driver. Considering the simplicity of the I/O necessary for my device, I've determined a userspace driver using libusb is the way to go.
From what I understand about USB drivers, I know that Linux will attempt to find a kernel driver immediately after enumerating the device. Since I'll only have my libusb driver, does that mean I'll have to expect an OS error (can't find kernel driver) every time I plug in my device? Is that just typical behavior when using libusb?
Not sure what libusb driver do in your device. Assuming your homemade USB is mass storage device (USB pendrive), it has separate driver which is missing in kernel. Thats reason OS display errors
Thanks for your reply Soibam. I probably didn't explain myself very well.
I have a homemade device that is not an HID or any other standard USB device, so no kernel driver will automatically load after enumeration. My intent is to write a driver using libusb, which is a user-space API library. So I technically have a driver, but it's not a kernel driver.
Here's the sequence of events as I understand it:
1. I plug in my homemade device.
2. Linux communicates with the device and enumerates it.
3. After enumeration, Linux attempts to load a kernel module associated with the device.
4. No module is found so an error is logged in /var/log/messages.
5. I execute my libusb driver at the command prompt and live happily ever after.
My question is, when writing USB drivers using libusb, is step 4 unavoidable?