Skip to content

braille: nbcon: Fix Braille console for NBCON API

Petr Mladek linux-serial lkml sashiko-reviews 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 4 repliesIn review
  2. v31 patch 2 repliesSuperseded
  3. v21 patch 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches14 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1braille: nbcon: Allow to use a serial console with NBCON API as Braille consoledrivers/accessibility/braille/braille_console.c drivers/tty/serial/8250/8250_port.c drivers/tty/serial/amba-pl011.c +4 more+159 -64 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchJohn Ogness
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/1] braille: nbcon: Fix Braille console for NBCON API

Hi,

this is v4 patch which tries to fix Braille console driver to work with serial console drivers ported to NBCON API.

I did a quick turnaround because it would be nice to get it into 7.3. Many people attend Plumbers conference the following week...

Changes against v3:

+ Removed unnecessary "locked" variable. [John]

+ Allow to use console driver even without write_atomic, except for panic mode [John]

+ Added parenthesis around (con->flags & CON_BRL) [John]

+ Exported nbcon_write_context_is_braille() [Sashiko]

+ Fixed many typos and wording [John]

Changes against v2:

+ Use con->device_lock() for non-panic case. Try even an unsafe acquire in panic(). This simulates the legacy locking using NBCON API.

+ Return when the nbcon context can't be acquired in panic(). The NBCON API is not ready to ignore the lock. Well, it should never happen in practice because the unsafe acquire...

+ Avoid the newline prepend logic in all serial consoles ported to NBCON API which have it. Add two APIs for checking whether either "con" or "wctxt" is in Braille mode.

+ Update commit message and comments in the code.

Changes against v1:

+ Merged into one patch. It is hard to explain nbcon_braille*() API without the user.

+ Reworked the locking, see the commit message for more details.

+ Fixed the check of CON_NBCON_ATOMIC_UNSAFE [Sashiko]

IMPORTANT: The solution is not safe in PREEMPT_RT. But it is better
then nothing. We could either solve it in v3. Or we could fix it later.

[v1] https://lore.kernel.org/r/[email protected]
[v2] https://lore.kernel.org/r/[email protected]
[v3] https://lore.kernel.org/r/[email protected]

Petr Mladek (1):
braille: nbcon: Allow to use a serial console with NBCON API as
Braille console

 .../accessibility/braille/braille_console.c   | 60 +++++++++++++-
 drivers/tty/serial/8250/8250_port.c           |  5 +-
 drivers/tty/serial/amba-pl011.c               |  2 +-
 drivers/tty/serial/imx.c                      |  2 +-
 drivers/tty/serial/sifive.c                   |  2 +-
 include/linux/console.h                       | 15 ++++
 kernel/printk/nbcon.c                         | 79 +++++++++++++++++++
 7 files changed, 159 insertions(+), 6 deletions(-)
Signature · 1 line
2.55.0