* Q: what is the need for console write callback if there is serial tx (start_tx) ?
@ 2016-09-15 20:19 Ran Shalit
2016-09-15 20:50 ` Valdis.Kletnieks at vt.edu
2016-09-16 6:15 ` Greg KH
0 siblings, 2 replies; 4+ messages in thread
From: Ran Shalit @ 2016-09-15 20:19 UTC (permalink / raw)
To: kernelnewbies
Hello,
I am writing a driver with serial tx/rx.
I am not sure what is the need console routines, when there is
serial/uart tx/rx.
Isn't writing to console, the same as outputing chars to serial ?
I've tried to find information on this, but found none.
Thank you,
Ran
^ permalink raw reply [flat|nested] 4+ messages in thread
* Q: what is the need for console write callback if there is serial tx (start_tx) ?
2016-09-15 20:19 Q: what is the need for console write callback if there is serial tx (start_tx) ? Ran Shalit
@ 2016-09-15 20:50 ` Valdis.Kletnieks at vt.edu
2016-09-16 7:11 ` Ran Shalit
2016-09-16 6:15 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2016-09-15 20:50 UTC (permalink / raw)
To: kernelnewbies
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160915/bd2c1b9a/attachment.bin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Q: what is the need for console write callback if there is serial tx (start_tx) ?
2016-09-15 20:19 Q: what is the need for console write callback if there is serial tx (start_tx) ? Ran Shalit
2016-09-15 20:50 ` Valdis.Kletnieks at vt.edu
@ 2016-09-16 6:15 ` Greg KH
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-09-16 6:15 UTC (permalink / raw)
To: kernelnewbies
On Thu, Sep 15, 2016 at 11:19:51PM +0300, Ran Shalit wrote:
> Hello,
>
> I am writing a driver with serial tx/rx.
Great! For what type of hardware?
> I am not sure what is the need console routines, when there is
> serial/uart tx/rx.
>
> Isn't writing to console, the same as outputing chars to serial ?
>
> I've tried to find information on this, but found none.
Just follow the "normal" tty api and your driver should be fine and work
with all sorts of consoles and programs and line disciplines.
good luck!
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Q: what is the need for console write callback if there is serial tx (start_tx) ?
2016-09-15 20:50 ` Valdis.Kletnieks at vt.edu
@ 2016-09-16 7:11 ` Ran Shalit
0 siblings, 0 replies; 4+ messages in thread
From: Ran Shalit @ 2016-09-16 7:11 UTC (permalink / raw)
To: kernelnewbies
On Thu, Sep 15, 2016 at 11:50 PM, <Valdis.Kletnieks@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-16 7:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 20:19 Q: what is the need for console write callback if there is serial tx (start_tx) ? Ran Shalit
2016-09-15 20:50 ` Valdis.Kletnieks at vt.edu
2016-09-16 7:11 ` Ran Shalit
2016-09-16 6:15 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).