Thanks for your tips.
Recompiling my kernel is not really an option because I want to have
it as simple and reusable as possible.
So I looked at the udev solution.
After some hacking I came out with this:
I already had a custom udev rule for the FT2232H that sets the group
and rights on the device node so I can use it as a user:
-------------------------
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010",
GROUP="plugdev", MODE="664"
-------------------------
I added a call to a script:
-------------------------
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010",
GROUP="plugdev", MODE="664", RUN+="/path/to/script/unbind_ftdi_sio.sh
%k 1.0"
-------------------------
The %k gives the location in the B-P format ((B)us and (P)ort). The
1.0 is the first device on this port which in my case is the ttyUSB0
(the interface A of the FT2232H). This is easy to modify.
The script unbind_ftdi_sio.sh is fairly simple:
-------------------------
#!/bin/sh
DEVICE="$1"
INTERFACE="$2"
echo -n ${DEVICE}:${INTERFACE} > /sys/bus/usb/drivers/ftdi_sio/unbind
-------------------------
Just chmod +x it and the whole thing is ready to go :)
So what happens is: You plug the device in, the drivers gets loaded
and claims both interfaces. Directly after that the shell script is
run and unbinds the driver "manually" from the interface A (or
whatever you specify).
I think I can live with this solution :)
Nils
On Tue, Nov 8, 2011 at 1:32 PM, Xiaofan Chen <[email protected]> wrote:
> On Tue, Nov 8, 2011 at 8:24 PM, Peter Stuge <[email protected]> wrote:
>> Nils Hesse wrote:
>>> Is there a known fix for this?
>>
>> Add a quirk to the ftdi_sio driver. See e.g.
>>
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3687f641307eeff6f7fe31a88dc39db88e89238b
>>
>
> Ah that is a good solution and helps future kernel
> versions, but you do need to recompile the kernel
> which I have not done for a long time...
>
>
> --
> Xiaofan
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Openocd-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openocd-devel
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel