>>>>> "Stefan" == Stefan Schoenleitner <dev.c0deb...@gmail.com> writes:

Hi,

 Stefan> There is the linux/drivers/char/atmel_serial.c driver which I
 Stefan> could modify, so that it also includes the driver code for
 Stefan> the speech codec.  However, obviously that would be a really
 Stefan> bad idea since it would duplicate code and completely bypass
 Stefan> the linux serial port abstraction layer.

 Stefan> It would be better to somehow write a speech codec driver
 Stefan> that depends on the UART driver.  Thus on the speech codec
 Stefan> serial port no ttySn device should be created by the UART
 Stefan> driver, but instead the speech codec driver should create the
 Stefan> device (e.g. /dev/speechcodec0).  Since the speech codec
 Stefan> driver should only do speech codec specific tasks, it should
 Stefan> use the UART driver to send and receive data over the serial
 Stefan> port.

The input layer has serio infrastructure for this (E.G. for serial
mice/touchscreens). Now, a speech codec doesn't have much to do with
input devices, but it atleast clearly seperates the lowlevel uart
communication from the speech codec handling.

Have a look in drivers/input/{serio,touchscreen}.

-- 
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to