[SOLVED] Forcing a specific driver for a device, through udev
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Forcing a specific driver for a device, through udev
My co-workers and I are trying to develop a USB device, which uses an FTDI chip as a USB-serial controller. The thing is, we would ideally like to set a cusom idVendor and idProduct on the FTDI chip.
The problem occurs that when we set custom idVendor and idProduct values, udev(7) loads the "usb" driver. If we leave the idVendor and idProduct values to their originals, udev(7) loads the "ftdi_sio" driver. The whole reason for the custom idVendor and idProduct values is so that I can (hopefully) write a udev(7) rule to map that particular device to a specific entry in /dev.
Is there a way to write a udev(7) rule so that you can forcefully load a particular driver for a device? Is there something else that could be done to get a similar result?
Google searching hasn't yielded anything conclusive, yet.
After poking around on IRC last night, I discovered that once it gets to udev(7), it's a little too late. The kernel needs to somehow be told that the device is supposed to use the ftdi_sio driver, instead of the usb driver.
It's starting to look like I might need to copy and modify the ftdi_sio driver to look for the specific idVendor and idProduct values, unless there is a way to do it with modules.d and surrounding bits.
EDIT: Alright, so I have solved this issue. We cannot change the idVendor and idProduct values of the FTDI chip if we want the kernel to recognize the device and use the ftdi_sio driver. I ended up concocting a udev(7) rule that will catch the FTDI USB-serial device and provide a nice, descriptive symlink.
The only other alternative I could see was copying and modifying the ftdi_sio driver from the kernel sources.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.