greg wrote: >On Sun, Aug 05, 2007 at 03:34:06PM -0500, David Hooker wrote: >> >> Hi- >> >> I have a device which has a CP2102 chip in it, and I see that the >> kernel I'm using (2.6.22.1-27.fc7) has a usb serial driver for the >> chip. My question is: how do I bind this driver to the device? Do I >> have to add the device's product/vendor ID's to the id_table in the >> code and rebuild my kernel? Or is there a way to associate the driver >> with the device from the command line? > >You can echo the vendor and device id to the "new_id" file in the >/sys/bus/usb-serial/drivers/cp2102/ directory. > >And you can send me a patch for the kernel so that it will be supported >automatically in the future. > >thanks, > >greg k-h
Ok, thanks... What is the format of the data I need to echo to that file? I went ahead and added the line to the driver, and rebuilt my kernel. I'm a complete noob when it comes to building kernels, etc... and I didn't see any errors with the build. I don't have the output now, but I saw that it compiled the cp2101.c file and there was an output line "LD [M] cp2101.ko". I checked dmesg and saw: usbcore: registered new interface driver usbserial drivers/usb/serial/usb-serial.c: USB Serial support registered for generic usbcore: registered new interface driver usbserial_generic drivers/usb/serial/usb-serial.c: USB Serial Driver core drivers/usb/serial/usb-serial.c: USB Serial support registered for cp2101 usbcore: registered new interface driver cp2101 drivers/usb/serial/cp2101.c: Silicon Labs CP2101/CP2102 RS232 serial adaptor driver v0.07 hub 3-0:1.0: port 2 disabled by hub (EMI?), re-enabling... usb 3-2: USB disconnect, address 8 usb 3-2: new full speed USB device using uhci_hcd and address 9 So I was assuming that my kernel build actually installed the new driver... is that correct? So then I was anticipating seeing dmesg output similar to this which I found in a forum: usb 3-3: new full speed USB device using ohci_hcd and address 3 CP2101 3-3:1.0: CP2101 converter detected usb 3-3: reset full speed USB device using ohci_hcd and address 3 usb 3-3: CP2101 converter now attached to ttyUSB0 ... but I didn't. I tried dis/re-connecting my device with the cp2102 in it, and only saw this: usb 3-2: USB disconnect, address 9 usb 3-2: new full speed USB device using uhci_hcd and address 10 usb 3-2: configuration #1 chosen from 1 choice I tried rebooting, and same story. So I did a modprobe cp2101, which loaded the driver and gave me the same messages in dmesg as when I rebuilt the kernel. Then I did the echo of the vendor/product to new_id, and the device is now recognized: usb 3-2: cp2101 converter now attached to ttyUSB0 So that works. What did I do wrong with my change to the driver code and rebuilding? I simply added this line to the id_table: { USB_DEVICE(0x0BED, 0x1100) }, /* MEI (TM) Cashflow-SC Bill/Voucher Acceptor */ The echo to new_id I did was: echo 0bed 1100 > /sys/bus/usb-serial/drivers/cp2101/new_id Thanks. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Linux-usb-users@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users