Q: what is the need for console write callback if there is serial tx (start_tx) ?

Ran Shalit ranshalit at gmail.com
Fri Sep 16 03:11:00 EDT 2016


On Thu, Sep 15, 2016 at 11:50 PM,  <Valdis.Kletnieks at vt.edu> wrote:
> On Thu, 15 Sep 2016 23:19:51 +0300, Ran Shalit said:
>
>> Isn't writing to console, the same as outputing chars to serial ?
>
> No.  For instance, consider any laptop where "console" is an LCD screen,
> and if it's recent hardware, there isn't a UART anywhere in the device, nor
> is there a serial port to connect to.  Or any system where virtual terminals
> are in the config, for that matter.
>
> Then there's netconsole, console-over-USB, and heaven knows what other
> variations.
>
> See Documentation/console/console.txt  for more information.
>

Hi,

I seen in kernel tty drivers examples where there are both callback
for serial (start_tx, etc) , and for console (register_console).
I am not sure what reason for having a driver support both console and
serial. when there is serail it means there is a uart consoller,
according to my understand the console routine also implement put_char
with the same uart console (not graphic display for example), so it
seems like duplication. I am probably miss understand something.

Thanks you,
Ran



More information about the Kernelnewbies mailing list