Sample Header Ad - 728x90

How are the TTY and serial_core related?

1 vote
1 answer
831 views
I need to write a new character device file for the UART, which allows a few more file operations than usually allowed (not just open, write, etc..) I'm on an embedded mainline linux kernel (v 5.4). I started looking at the UART drivers and notice there are many things: 1. First, there are a lot of tty files. I know that tty stands for Teletypewriter. I don't think it's a piece of hardware. 2. Then, there is the specific driver for my processor, which handles interrupts on UART. 3. Then, there is (what I believe to be) the character device driver for uart, written in serial_core.c I remarked that serial_core.c doesn't have a file operations struct, but uses a tty_operations. What is happening here? I cannot understand how all these files are related to each other, what do they really do. More precisely, I would like to understand the role of each one of them. I'm tasked to write a character device driver for the uart but I do not know which one of these files (maybe all?) would my driver have to substitute. Thanks,
Asked by Mölp (31 rep)
Oct 14, 2020, 08:11 AM
Last activity: Oct 23, 2020, 10:30 AM