On 27 Jun 1999, Dag Brattli wrote:

>> You probably also want allocate the minors for centronics too then. 
>> (you could just stub out that portion, returning a ENODEV or something
>> like that..)
>
>Centronics is a parallel device and should probably be implemented as a
>parallel device (ircomm-par module?), this is basically the reason why
>Takahide and myself have impl. ircomm as two modules (ircomm and
>ircomm-tty).
>... but this would mean that we must allocate a new major-number for ircomm 
>centronics mode :-( Well, serial and parallel devices have different
>major-numbers, so this sort of makes sense. But it would be good to have
>them implemented in the same device (and have the same major-number). 

IMHO, the cleanest way would be to have the IrCOMM driver register a ttySxx
(using register_serial() in <linux/serial.h>) used for accessing peers that
support 9, 3 and 3-raw wires and (just like you thought, Dag) implement an
ircomm-par module for IrCOMM Centronics that either uses the major allocated
for IrCOMM or registers a new lpx with the lp driver.  The same goes for
IrLPT.  AFAIK these two are actually TWO separate protocols (even if they are
_very_ similar) and there should probably be a clear distinction between them
in the kernel code, even if they both communicate through the same device. 
(lpx)


I'm sure however that there is some reason to have it the way it is today; a
separate serial driver for IrCOMM (9/3/3r) with it's own major device number.
Is it eg. legal to depend on other parts of the kernel?  Please help me out
on that, I'm just saying I think it would be convenient and consistent to have
IrDA devices in my surroundings show up among the regular (ttySxx/lpx) devices
in my system.


//Peter

--
irc: CareBear\    tel: +46-40-914420
irl: Peter Stuge  gsm: +46-705-783805

Reply via email to