In the famous "The TTY demystified", the following figure is shown:
from which it's seemed that the user process is communicating with the "TTY driver", which in turn communicates with the line disciplie. However, in the O'Reilly book:
It seems that the user application is communicating with the "tty core", which in turn communicate with the line discipline, and the tty driver is the last layer before hardware. Can someone explain what exactly is a "tty driver"? I want to sharpen my question:
As far as I know, drivers are pieces of software used to communicate with hardware. e.g., there's a device driver that knows how to communicate with a disk controller. This driver is the one who actually reads from and writes to the device controller's registers. On the other hand - there are drivers that aren't used to communicate with hardware, such as filesystem drivers, which are basically a software that knows how to organize data in a specific manner.
Which type of driver is a tty driver? And where does the line discipline fit in?
EDIT
After further reading and observation in the O'Reilly chapter, it seems to me that what O'Reilly means by "TTY Driver" is actually what the "The TTY demystified" means by "UART driver", while what O'Reilly means by "TTY core" is what the "The TTY demystified" means by "TTY driver".
Meaning, the O'Reilly's "TTY driver" is a device driver used to interact with the hardware, whereas the "TTY core" is a kernel-software (hence - driver (?)) used to receive the data from the user process, send it to through the line discipline and to the correct driver (let it be a UART driver or a pty master).
Is that correct?