Search code examples
ckernellinux-device-driverkernel-moduletty

How to write read() with poll() functionality in kernel for tty driver?


In my driver module data is coming in callback function. I want to add data to read callback but not able to find read callback in tty structure


Solution

  • There is no read callback. The tty core buffers the data received by the tty drivers in a structure called struct tty_flip_buffer. Read Chapter 18 of LDD3