[linux-usb-devel] [RFC] g_serial: Real tty device passthrough.

Stefan Schmidt stefan at datenfreihafen.org
Fri Mar 9 20:09:14 CET 2007


[added cc's again]

Hello.

On Fri, 2007-03-09 at 14:19, Felipe Balbi wrote:
> On 3/8/07, Stefan Schmidt <stefan at datenfreihafen.org> wrote:
> >
> >We have a linux smartphone here with the GSM modem on /dev/ttySAC0 .
> >As now like to make this tty available to the host through g_serial.
> >This allows us faster development and testing.
> Ok, this can be done but g_serial was developed to use Major number
> 127... I don't know that you could just pass another device to the
> module

You can't. That was just the idea. Sorry for confusing you.

> you should write some glue module between g_serial and your
> "GSM" module. And maybe you should modify g_serial a little bit for
> this to work fine.

I had two points asking here for suggestion:

1. Ask if code for something like this exists that we can use instead
   reinvent the wheel.

2. Ask about opinions and suggestions for doing this in an elegant
   way. We don't like to write throw-away code. It should go into
   mainline and also be used for other projects.

Just to get it right. You suggest to extend g_serial for communication
with another driver and write some glue which communicates with
g_serial on the one and ttySAC0 on the other side?

I could life with that solution, but why not extend g_serial with a
paramter to communicate directly with another tty?

> If you could show us some of the code that creates the /dev/ttySAC0
> maybe we could point you something.

It's the standard tty driver for this SoC (s3c2410). The GSM part of
the phone is connected to the main CPU through a standard serial
connection on the PCB. Nothing fancy.

> Which smartphone are you using? Which model? Manufacturer? Which
> linux-kernel? etc...

It's the Neo1973 smartphone. First device using the OpenMoko open
source mobile stack. http://openmoko.org/

Atm we are running 2.6.20.1 and tracking newer versions. Harald Welte
is already working with Ben Dooks to get some patches for the samasung
SoC upstream. Other will follow once they are stable and we cleaned
them up. You can track them here: (euilt patchset in svn)

https://svn.openmoko.org/trunk/src/target/kernel/patches/

> >modprobe g_serial device=ttySAC0
> This you should implement... g_serial doesn't yet have a way for
> Major/Minor number changing...

Yeah, that was the idea. Main question was how to do this in an
elegant way.

regards
Stefan Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 241 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20070309/a91ec76b/attachment.pgp 


More information about the openmoko-kernel mailing list