lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 26 Nov 2014 12:23:20 +0000
From:	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>
To:	georg@...orsch-tech.de
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Comedi device layered on top of FT232RL

On Tue, 25 Nov 2014 15:39:28 +0100
georg@...orsch-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ