Alan, (slightly long mail warning..)
as I mentioned before, the problem is how can I know which platform device's registration caused the tty_open to be called ?
Background: [apart from the mail chain below...]
A platform driver by name ST_0 allows registration of certain protocol driver like BT_0 to be registered onto it, and use it as the transport.
This plat driver ST_O now signals the user-space to open up a TTY device and install the ldisc on top of it. (ldisc being ST_0's registered ldisc during it's plat probe).
Now the plat driver's tty_open previously registered is called, but here lies the problem - On what basis do I know that it was because of ST_0 and also How can I send the device number 'x' information in ttySx for user-space application to open/tiocsetd on that device.
All these problems would be solved, if only we could open/tiocsetd a ldisc from the kernel space - basically the ability to claim/use a TTY interface.
something like,
tty_register_ldisc(N_TI_WL, &ldisc_ops, UART_NUM_1);
tty_set_ldisc(); from ldisc drivers itself..
please comment...