From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: georg@schorsch-tech.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: Comedi device layered on top of FT232RL
Date: Wed, 26 Nov 2014 12:23:20 +0000 [thread overview]
Message-ID: <20141126122320.4051857f@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <34ec4bedbde2ede76f23b31e337bb37f.squirrel@wm.schorsch-tech.de>
On Tue, 25 Nov 2014 15:39:28 +0100
georg@schorsch-tech.de wrote:
> Hi LKML,
> right now i try to understand if the following thing is possible:
>
> I have an embedded device with an FT232RL interface which gets
> handled by ftdi_ser.ko. I can with userspace tools talk to it over
> /dev/ttyUSB0. The device control some digital inputs/outputs and some
> ADC/DACs. All is handled over a serial protocol.
>
> I thought about following options:
> 1.Userspace daemon which sits on /dev/ttyUSB0
> Pro: Easy to implement
> Con: It would not be an comedi device and thus not able to use the
> comedi features
>
> 2.Kernel driver:
> Pro: It would be possible to use the comedi interface
> Con: I would duplicate much of the code used for ftdi_ser.ko.
>
> OFC i would like to avoid code duplication but i would like to use the
> features and interface from comedi.
>
> What is the recommended way to solve such issue?
That depends a lot on the protocol and interface. If the Comedi interface
over the ftdi is a serial protocol then the right way to use it is
to write a line discipline. It can then sit on top of the existing serial
drivers and will also conveniently work with any other kind of tty serial
driver (or even ptys) which can be useful if you need to remote control
devices etc.
Alan
prev parent reply other threads:[~2014-11-26 12:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 14:39 georg
2014-11-26 12:23 ` One Thousand Gnomes [this message]
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=20141126122320.4051857f@lxorguk.ukuu.org.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=georg@schorsch-tech.de \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®