summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-06 11:32:54 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-06 11:32:54 +0200
commit22430ae5d90ab288b0ee2ad99ae941f4a666b694 (patch)
tree356f26177b7b428232f7205c452b6d98cde9fa7a /include/linux
parent2c3418fffa9d037b2038a6db48be63f9e2291806 (diff)
parentc83e3d2912432107148cc5e288ddd153a84c0f43 (diff)
Merge tag 'printk-for-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk fix from Petr Mladek: - Allow using Braille console with a serial console driver converted to NBCON API * tag 'printk-for-7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: braille: nbcon: Allow to use a serial console with NBCON API as Braille console
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/console.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 502d1abe3f50..df23148987ee 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -615,6 +615,15 @@ extern bool nbcon_allow_unsafe_takeover(void);
extern bool nbcon_kdb_try_acquire(struct console *con,
struct nbcon_write_context *wctxt);
extern void nbcon_kdb_release(struct nbcon_write_context *wctxt);
+extern bool nbcon_write_context_is_braille(struct nbcon_write_context *wctxt);
+extern bool nbcon_braille_try_acquire(struct console *con,
+ struct nbcon_write_context *wctxt);
+extern void nbcon_braille_release(struct nbcon_write_context *wctxt);
+
+static inline bool nbcon_is_braille(struct console *con)
+{
+ return con && (con->flags & CON_BRL);
+}
/*
* Check if the given console is currently capable and allowed to print
@@ -678,8 +687,14 @@ static inline void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt) { }
static inline bool nbcon_kdb_try_acquire(struct console *con,
struct nbcon_write_context *wctxt) { return false; }
static inline void nbcon_kdb_release(struct nbcon_write_context *wctxt) { }
+static inline
+bool nbcon_write_context_is_braille(struct nbcon_write_context *wctxt) { return false; }
static inline bool console_is_usable(struct console *con, short flags,
bool use_atomic) { return false; }
+static inline bool nbcon_braille_try_acquire(struct console *con,
+ struct nbcon_write_context *wctxt) { return false; }
+static inline void nbcon_braille_release(struct nbcon_write_context *wctxt) { }
+static inline bool nbcon_is_braille(struct console *con) { return false; }
#endif
extern int console_set_on_cmdline;