The line discipline glues the low level device driver code with the high level generic interface routines (such as read(2), write(2) and ioctl(2)), and is responsible for implementing the semantics associated with the device.
Line discipline acts as a mediator between the fundamental code of devices and higher-level interfaces, connecting functions such as read(2), write(2), and ioctl(2), and determining the rules that govern how devices function.