<div dir="ltr">Hi<br>I am trying to understand the vt tty driver.<br>I have been trying to read the code and have been referring to Linux Device Drivers book. I have read this <a href="http://www.linusakesson.net/programming/tty">http://www.linusakesson.net/programming/tty</a> to get an idea of what ttys are etc.<br>

<br>I have many doubts and would be very greatful if someone could help me out.<br><br>I am not sure where this driver fits into the rest of things. I mean, from where are the functions in this driver called, and what does the driver actually do? Does it interact with the screen hardware? If it does, how?<br>

<br>From what I understand, the vt driver does the work of the &#39;Terminal emulator&#39; in this <a href="http://www.linusakesson.net/programming/tty/case3.png">http://www.linusakesson.net/programming/tty/case3.png</a> . Am I right?<br>

<br>The LDD3 book says that after the driver registers itself, it registers the devices it controls through the tty_register_device function. But I cannot see this being done in the vt.c file.   Why?<br><br>Also, there are two functions con_write and vt_console_print that write. I was told that vt_console_print is high level. It is called by the console code. con_write  is low level. It writes to the tty. But I still cannot understand what each one does. Also I do not know how to find out from where these functions are called: con_write is assigned to .write of the struct  tty_operations con_ops, vt_console_print .write of struct console vt_console_driver. But from where are these .write s called?<br>

<br>This is the first time I am working with a driver or anything to do with the kernel, so even if my doubts are stupid please help me out. <br>Thank you.<br><br>--<br>Regards,<br>Chinmay Bapat<br></div>