[PATCH 1/2] drivers:staging:ti-st: move TI_ST from staging

Savoy, Pavan pavan_savoy at ti.com
Thu Oct 7 18:35:41 UTC 2010


> -----Original Message-----
> From: Jiri Slaby [mailto:jirislaby at gmail.com]
> Sent: Thursday, October 07, 2010 1:26 PM
> To: Savoy, Pavan
> Cc: gregkh at suse.de; linux-kernel at vger.kernel.org; devel at driverdev.osuosl.org;
> alan at lxorguk.ukuu.org.uk
> Subject: Re: [PATCH 1/2] drivers:staging:ti-st: move TI_ST from staging
> 
> On 10/07/2010 04:52 PM, Savoy, Pavan wrote:
> > Per-system? I don't understand this.
> > There can be ldisc for each individual TTY, so doesn't that make it per
> device?
> 
> No, you can have only up to NR_LDISCS ldiscs in the system and you have
> to choose one of them to "handle" a particular tty.

Agree.

> IOW, you register an ldisc which is available for everybody then. And it
> cannot have ->private_data since everybody would share this single

However, I would only register a ldisc for a TTY. I agree TTY was not meant
to used in such a way, But it is highly unlike i2c or SPI where the adapter
and the client drivers are separate.
So in that case, since the tty ldisc register required something to pass onto
the tty's open function which is called when the line discipline is actually accessed (i.e ioctl TIOCSETD) and not when /dev/ttyS* is opened.


> ->private_data. Instead everybody comes with their devices as ttys which
> have ->private_data for everybody's data and ->disc_data for you to note
> anything about the (tty) device.
> 
> Am I missing something?

The situation here was to access the UART from a kernel driver. Say we have
a V4L2 FM radio over the UART, How can I write a v4L2 driver? I has to be a 
line discipline driver correct?

Also, I agree on the comment you made that the line discipline ops are singleton
and need not be kmalloc-ed, I am just mentioning what I wished for from the TTY.

> regards,
> --
> js



More information about the devel mailing list