All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: Stefan Schoenleitner <dev.c0debabe@gmail.com>
Cc: linux-embedded@vger.kernel.org
Subject: Re: Using UART in kernel driver code on AT91SAM9260
Date: Wed, 24 Jun 2009 11:49:10 +0200	[thread overview]
Message-ID: <8763em3qsp.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <4A41EA93.2070904@gmail.com> (Stefan Schoenleitner's message of "Wed\, 24 Jun 2009 10\:57\:55 +0200")

>>>>> "Stefan" == Stefan Schoenleitner <dev.c0debabe@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

  reply	other threads:[~2009-06-24  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24  8:57 Using UART in kernel driver code on AT91SAM9260 Stefan Schoenleitner
2009-06-24  9:49 ` Peter Korsgaard [this message]
2009-06-24  9:59   ` Stefan Schoenleitner
2009-06-24  9:49 ` Stefan Schoenleitner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8763em3qsp.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=dev.c0debabe@gmail.com \
    --cc=linux-embedded@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.