On Tue, 27 Feb 2001 09:33:29 -0800, Greg KH wrote:
> On Tue, Feb 27, 2001 at 08:29:03AM +0000, Dag Brattli wrote:
> > Linus,
> >
> > Please apply this patch to your latest Linux-2.4.2 source. Changes:
> >
> > o IrDA-USB dongle support [new feature]
>
> I'd recommend that this file be in the /drivers/usb directory, much like
> almost all other USB drivers are.
Yes, but do we want to spread the IrDA code around? The same argument
applies to IrDA device drivers!?
> > +/* These are the currently known IrDA USB dongles. Add new dongles here */
> > +struct irda_usb_dongle dongles[] = { /* idVendor, idProduct, idCapability */
> > + /* ACTiSYS Corp, ACT-IR2000U FIR-USB Adapter */
> > + { 0x9c4, 0x011, IUC_SPEED_BUG | IUC_NO_WINDOW },
> > + /* KC Technology Inc., KC-180 USB IrDA Device */
> > + { 0x50f, 0x180, IUC_SPEED_BUG | IUC_NO_WINDOW },
> > + /* Extended Systems, Inc., XTNDAccess IrDA USB (ESI-9685) */
> > + { 0x8e9, 0x100, IUC_SPEED_BUG | IUC_NO_WINDOW },
> > + { 0, 0, 0 }, /* The end */
> > +};
>
> You should also probably add the following snippet to allow the USB
> hotplug functionality to work properly:
>
> static __devinitdata struct usb_device_id id_table [] = {
> { USB_DEVICE(0x09c4, 0x0011) },
> { USB_DEVICE(0x050f, 0x0180) },
> { USB_DEVICE(0x08e9, 0x0100) },
> { } /* Terminating entry */
> };
> MODULE_DEVICE_TABLE (usb, id_table);
OK!
> If IRDA has a class descriptor, can't you just rely on that, and not
> have to worry about the individual device vendor and product ids?
Sorry, some of the dongles don't follow the spec fully, as you can see from
our table. Actually none of them follow the spec, since they are all based
on the same chip which was made before the spec was finished. But there
should be a new dongle out now which do follow the spec (but we haven't
got hold of it yet)
>
> > + * This routine is called by the USB subsystem for each new device
> > + * in the system. We need to check if the device is ours, and in
> > + * this case start handling it.
> > + * Note : it might be worth protecting this function by a global
> > + * spinlock...
> > +static void *irda_usb_probe(struct usb_device *dev, unsigned int ifnum,
> > + const struct usb_device_id *id)
>
> A spinlock is not needed as the probe functions are called sequentially.
>
> thanks,
>
> greg k-h
---- Dag Brattli <dag@brattli.net> My homepage http://www.brattli.net/dag/ Try Linux-IrDA: http://irda.sourceforge.net/ Try Pygmy: http://pygmy.sourceforge.net/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Feb 28 2001 - 21:00:14 EST