[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?
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.