I am writing a serial driver on Linux ?2.4.18-rmk7-pxa1. I was going through the source code and I found that the device specific driver does not implemen the 'read' function. The interrupt handler of the device specific driver copies the character read in to tty->flip.char_buf_ptr and then calls 'tty_flip_buffer_push' function. I checked from the 'tty_read' function and it calles 'tty->ldisc.read' function call.
My question is, when the user calls the 'read' call on say /dev/ttyS0 from which read function the character is actually read. If someone could give me the function trace it would be great. Also, I could not find out what is this 'tty->ldisc.read' function and from where is it coming?
Any help in this area is highly appreciated.
Thanks, Bhavin