Writing a console/tty driver -- how to use tty_port?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Timur Tabi
Date: Wednesday, October 27, 2010 - 2:04 pm

Greg,

Do you have an updated version of Tiny TTY that uses tty_port structures?  I'm
trying to write a new TTY driver for a device that is not a UART, and I'm having
a hard time finding a good example.  I suspect I need to understand the tty_port
structure, but I can't find any documentation for it.

One specific problem I'm having is that I can't figure out how to get a
tty_struct pointer in my interrupt handler.  The ISR gets called whenever there
is new input, and it needs to call tty_insert_flip_string().  But it appears
that it's possible to have my driver opened multiple times, each time creating a
new TTY.  But since I can only have one interrupt handler, I don't know how to
determine which of the tty_structs to use.  I figure tty_port is a way to
resolve this problem, but I don't know how to use it exactly.

-- 
Timur Tabi
Linux kernel developer at Freescale

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Writing a console/tty driver -- how to use tty_port?, Timur Tabi, (Wed Oct 27, 2:04 pm)
Re: Writing a console/tty driver -- how to use tty_port?, Arnd Bergmann, (Thu Oct 28, 1:57 pm)
Re: Writing a console/tty driver -- how to use tty_port?, Arnd Bergmann, (Fri Oct 29, 7:21 am)
Re: Writing a console/tty driver -- how to use tty_port?, Arnd Bergmann, (Fri Oct 29, 4:55 pm)