mbox series

[v2,0/2] serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

Message ID 20231016083522.945453-1-rasmus.villemoes@prevas.dk
Headers show
Series serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE | expand

Message

Rasmus Villemoes Oct. 16, 2023, 8:35 a.m. UTC
v2:
- fix implementation (lacked CONFIG_ inside IS_ENABLED...).

- drop dependency on CONSOLE_FLUSH_SUPPORT - that governs whether
  functions for explicit flushing should be built, and is not actually
  a requirement for allowing this implicit flushing, so the features
  should be selectable independently.

- add Simon's R-b to 1/2

1/2 is trivial prep. Motivation from 2/2:

When debugging, one sometimes only gets partial output lines or
nothing at all from the last printf, because the uart has a largish
buffer, and the code after the printf() may cause the CPU to hang
before the uart IP has time to actually emit all the characters. That
can be very confusing, because one doesn't then know exactly where the
hang happens.

Rasmus Villemoes (2):
  serial: serial-uclass.c: move definition of _serial_flush up a bit
  serial: introduce CONFIG_CONSOLE_FLUSH_ON_NEWLINE

 common/Kconfig                 | 10 ++++++++++
 drivers/serial/serial-uclass.c | 28 ++++++++++++++++------------
 2 files changed, 26 insertions(+), 12 deletions(-)