libftdi Archives

Subject: Re: Design decisions, was: Re: Claiming devices...

From: Xiaofan Chen <xiaofanc@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Wed, 6 Oct 2010 19:40:22 +0800
On Wed, Oct 6, 2010 at 7:34 PM, Uwe Bonnes
<bon@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hallo,
> we all exchanged our point of views. Now we need to come to some conclusions:
> - should we give ftdi_usb_open_dev() more options how to handle different
> situations?
> Possible situations are:
> -- ftdi_sio is loaded, should we unload or abort

My vote is to unload. If not, the user should not use libftdi in the
first place.

> -- some other application has claimed the device via usbfs, should we force
> claiming and continue or should we exit

Either way. I would more inclined to exit and I tend to think it is a current
libusb bug so that you can force claiming.

> -- If we unloaded ftdi_sio, should we attach it again on exit

Either way.

> - Should we make all these decisions configurable?

I am okay with having the 2nd and the 3rd to be configurable.

> What we can do depends however on what information libusb provides us. At
> the moment we can distinguish between ftdi_sio and usbfs...

Actually you do not really know the name of the attached driver
with the current libusb-1.0 API, only libusb-0.1 API can give you the
name of the kernel driver attached.


libftdi - see for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread