Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 10-05-2010, 06:38 PM   #1
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
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.
Old 10-06-2010, 05:56 AM   #2
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
Strange, I did a google search on writing udev rules and it came up with

So you probably need something like this:
SUBSYSTEM="usb", ATTRS{idVendor}="xxxx", ATTRS{idProduct}="xxxx", RUN+="modprobe ftdi_sio" NAME="Whatever"
Also you should check the directories /etc/udev/rules.d and /lib/udev/rules.d

Old 10-06-2010, 12:46 PM   #3
Senior Member
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Original Poster
Rep: Reputation: 65
Thanks, gdejonge. I've read that too.

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.

Last edited by indienick; 10-07-2010 at 04:03 PM.


ftdi_sio, udev, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't bind my device to a driver, or get a /dev/<devname> created by udev will_berry70 Linux - General 1 12-07-2009 10:32 AM
How to load a specific device driver hasmak Linux - Newbie 11 01-02-2009 02:07 PM
Installing Device Specific driver? Zangai Linux - Wireless Networking 1 05-03-2008 10:29 PM
USB device is recognized, but wount access it's specific driver. Lechium Linux - Software 2 08-05-2004 02:26 PM
Traffi forcing on a specific interface kbassyouny Linux - Software 0 07-04-2003 05:53 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration