From: Jean Tourrilhes <jt@hp...> - 2006-02-10 00:21:23
David Basden wrote :
> I've had an IRwave 320S RS232 SIR dongle for a few years, but it's
> been gathering dust because I could never get it working under Linux.
> I took a closer look today, and it seems it's actually based on the
> Temic/Vishay TOIM3232 chip.
> I've put together a quick driver for it based on the tekram-sir dongle
> driver (hopefully i've credited this properly in the headers). It worked
> fine for me pretty much straigth off, so it hasn't been tested that
> much. It was talking with ObexFTP to my Nokia and switching back and forth
> between 9600 and 115200 without a hitch.
Congratulation on the good job. Serial dongle drivers are not
very complex, however I'm impressed by your extensive documentation.
Few comments, for you and Samuel :
> * Filename: tiom3232.c
The convention is that all serial dongle drivers end with the
suffix '-sir', so the file should be 'tiom3232-sir.c'.
The first reason is that this differentiate new dongle drivers
from old dongle drivers.
The second reason is that when like most people you have
multi-page 'lsmod' listing, this helps remember that the module with a
funny name is really an IrDA module.
(Actually, I'm willing to be that your driver was based on
tekram-sir.c, not tekram.c).
> .type = IRDA_TOIM3232_DONGLE,
This require a change in .../include/linux/irda.h, the patch
was not included with the file. You just allocate a new dongle number
at the end of the list.
The corresponding change needs to happen in irattach. And the
man page needs to be updated.
> MODULE_ALIAS("irda-dongle-0"); /* IRDA_TOIM3232_DONGLE */
You should use the dongle number allocated in the step above,
which should be "irda-dongle-12". Lucky you are, next dongle driver
will get 13 ;-)