Hi,

I am working on a gadget which is based on kernel-2.4.28. I gone
through the documents available on web for gadget driver
implementation. I am having a problem in deciding whether to implement
user space driver or in kernel. Actually My driver have 2
configurations. Device will work in the configuration selected by the
host when host sends SET_CONFIGURATION (host will come to know the no.
of configurations by GET_CONFIGURATION). There are 2 interfaces in the
configuration 0 and 3 interfaces in configuration 1. I have to
implement the interface driver in configuration1. This driver will
take care of  bulk transfer and isochronous transfer. As far as bulk
transfer is concerned there are not much issues as it transfers vendor
commands only, but for Isochronous transfer I need to transfer
data(audio) to Host. I gone through the text at
http://tali.admingilde.org/linux-docbook/gadget/index.html which says
Async I/O is available in kernel 2.6. My kernel is 2.4 as I mentioned
where async I/O is not supported. In such circumstances Whether doing
ISOC transfer from user space will be a nice thing to do?
How the latency will affect the performance of the driver?

Furthermore I gone through the code of inode.c (gadgetfs) which will
be used to implement the driver in user space. The document "[patch
2.6.0-test4] usb "gadgetfs" (1/2)" at http://lwn.net/Articles/47571/
link says the driver supports single configuration and the code in
dev_config()
if (dev->dev->bLength != USB_DT_DEVICE_SIZE
                        || dev->dev->bDescriptorType != USB_DT_DEVICE
                        || dev->dev->bNumConfigurations != 1)
                goto fail;
        dev->dev->bNumConfigurations = 1;
        dev->dev->bcdUSB = __constant_cpu_to_le16 (0x0200);
also says so.
I am not sure by using gadgetfs I cannot provide options of having 2
configurations to Host ?

Any pointer will be great help.

Thanks
Anil
-
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to