public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Writing a console/tty driver -- how to use tty_port?
@ 2010-10-27 21:04 Timur Tabi
  2010-10-27 22:19 ` Alan Cox
  2010-10-28 20:57 ` Arnd Bergmann
  0 siblings, 2 replies; 12+ messages in thread
From: Timur Tabi @ 2010-10-27 21:04 UTC (permalink / raw)
  To: gregkh, lkml

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-10-29 23:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-27 21:04 Writing a console/tty driver -- how to use tty_port? Timur Tabi
2010-10-27 22:19 ` Alan Cox
2010-10-28 19:35   ` Timur Tabi
2010-10-29 13:55     ` Timur Tabi
2010-10-29 14:14       ` Timur Tabi
2010-10-28 20:34   ` Timur Tabi
2010-10-28 20:47     ` Timur Tabi
2010-10-28 20:57 ` Arnd Bergmann
2010-10-28 21:08   ` Timur Tabi
2010-10-29 14:21     ` Arnd Bergmann
2010-10-28 22:11   ` Alan Cox
2010-10-29 23:55     ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox