Legacy serial device driver - serio/inputattach vs. ldisc vs. userspace daemon
Rolf Offermanns
rolf.offermanns at gmx.net
Wed Dec 5 05:52:43 CST 2007
Hello Mentors!
I am about to write a driver for a self-made serial device and would
like to have some opinions about the best way to do it. It is basically
a microcontroler (atmel based) attached to the serial port which has
multiple functions "behind" it.
The setup looks like this:
RS232 <-> Microcontroler <---> Touchpanel
+-> Some button keys
+-> Temp. sensor
+-> You name it
The Atmel multiplexes the single functions on one serial line and now
it's my turn to demultiplex them again an the Linux side.
I would like to have an input event device for the touchpanel (and maybe
the keys) and character devices for the other stuff (temprature sensor).
I browsed the mailinglists and googled a bit and came it with three way
to tackle this:
1. serio driver, like some serial touchpanels use together with
"inputattach".
2. Line discipline. I have not read much about this, but it was
mentioned as a possible solution in another thread on LKML for a legacy
serial device. (http://lkml.org/lkml/2007/6/19/254)
3. A userspace daemon which sits on /dev/ttyS0 and distributes the data
to muliple ptys.
Am I on the right track? Which option is the best in your opinion?
Any help is appreciated.
Thanks,
Rolf
More information about the Kernel-mentors
mailing list