Re: [PATCH] [RFC] ark3116: add IrDA support (for Gembird UIR-22)

From: Alan Cox
Date: Mon Jul 27 2009 - 06:14:30 EST


> The next step was usbsnoop to find what windows driver does with the device.
> The result is the patch below. Now the device works after plugging and running
> "irattach /dev/ttyUSB0 -s".
>
> But how to make it appear as a real IrDA device by itself? Another problem is
> mixing IrDA with USB serial driver. Is a separate driver (something like
> ark3116-irda) needed?

For standard devices using serial/tty then irattach is the right way to
do it. Nothing else should be needed.

> + irda = le16_to_cpu(serial->dev->descriptor.idProduct) == 0x3118;
> + if (irda)
> + dbg("IrDA mode");
> +

I would split this out into

static int is_irda(serial) { }

just so that anyone who needs to add more irda adapters can find it
easily and do so neatly.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/