Em Sex, 2009-05-15 às 20:15 +0300, Ilya Petrov escreveu:
> Hi!
> 
> I`m hacking mux driver now.
> I`m doing some cleanup to make it looking not so hmm... strange.
> 
> In moto code mux driver is splitted to ipc-usb driver (tty) and
> ts07.10 multiplexer.
> As wyrm said, on some old phones bp was connected via uart.
> 
> So some questions:
> 
> 1) should we keep ipc-usb and ts0710 as two separate drivers?
> 2) if yes, how they should interact?

Yes, I think that tty_ops is the best. It is already used for MUX -> IPC
write(), and it should be used for the read() too.

> 3) do we have any plans to support mux over uart?

If both drivers talk to each other with tty_ops, then uart will be
trivial to support later. But at the moment, NO.

> On gen1 we have 16 tty lines: 8 command and 8 data.
> On gen2 we have 23 tty lines: 10 command and 13 data.
> 
> In moto code mux line numbers are different from tty device numbers, so
> they  have mappings.
> 
> Some some more questions:
> 
> 1) do we need to use all 16 or 23 muxes? (qtopia-ezx uses first 4)
> 2) do we need dlci <-> tty number mappings, or just use dlci line
> numbers as device numbers?

Use dlci lines as device numbers. No mapping, use a standard from the
kernel so userspace doesnt need to be different between the phones.

Case userspace tries to open an invalid dlci line, probably you will get
some error from BP, then we just return an error to userspace, and its
all fine.

> 3) how can we use data lines?

Same as AT lines? :)

> 4) how should we specify muxes count (i think somewhere in ezx.c)?

If BP does not return an error on an invalid DLCI open, then we need to
pass some platform_data. If it returns an error, then its not needed.

> In moto driver channel 0 (control or server channel) opens when
> one of channels opens and closes when first channel closes.
> Other channels opens and closes when they are opened or closed from userspace.
> 
> AFAIK we should open first 8 channels (and read data from them?) to
> keep bp from panic.

just the open() is enough atm. But you can fake the open() anyway, you
just have to send the data to BP so it thinks that the line was opened.

> How should we handle openning/closing channels?

Do nothing to warn bp about open()/close(). Make it fully virtual, let
bp think that all the lines are always opened.

-- 
Daniel Ribeiro


Reply via email to