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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jiri Slaby [mailto:jirislaby@xxxxxxxxx]
> Sent: Thursday, October 07, 2010 1:26 PM
> To: Savoy, Pavan
> Cc: gregkh@xxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; devel@xxxxxxxxxxxxxxxxxxxx;
> alan@xxxxxxxxxxxxxxxxxxx
> 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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux