summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-19 18:44:41 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-19 18:44:41 +0300
commit73398c2772d04ee656a654c63db85851381cd147 (patch)
treeb6f659fdbf9c55dbe9c82a49824dc538ccecd44e /include
parent40735a683bf844a453d7a0f91e5e3daa0abc659b (diff)
parenta1a81aef99e853dec84241d701fbf587d713eb5b (diff)
downloadlinux-73398c2772d04ee656a654c63db85851381cd147.tar.xz
Merge tag 'tty-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here is the set of tty and serial driver changes for 7.1-rc1. Not much here this cycle, biggest thing is the removal of an old driver that never got any actual hardware support (esp32), and the second try to moving the tty ports to their own workqueues (first try was in 7.0-rc1 but was reverted due to problems) Otherwise it's just a small set of driver updates and some vt modifier key enhancements. All have been in linux-next for a while with no reported issues" * tag 'tty-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (35 commits) tty: serial: ip22zilog: Fix section mispatch warning hvc/xen: Check console connection flag serial: sh-sci: Add support for RZ/G3L RSCI dt-bindings: serial: renesas,rsci: Document RZ/G3L SoC tty: atmel_serial: update outdated reference to atmel_tasklet_func() serial: xilinx_uartps: Drop unused include serial: qcom-geni: drop stray newline format specifier serial: 8250: loongson: Enable building on MIPS Loongson64 dt-bindings: serial: 8250: Add Loongson 3A4000 uart compatible serial: 8250_fintek: Add support for F81214E tty: tty_port: add workqueue to flip TTY buffer vt: support ITU-T T.416 color subparameters serial: qcom-geni: Fix RTS behavior with flow control tty: serial: imx: keep dma request disabled before dma transfer setup tty: serial: 8250: Add SystemBase Multi I/O cards serial: pic32_uart: allow driver to be compiled on all architectures with COMPILE_TEST serial: tegra: remove Kconfig dependency on APB DMA controller dt-bindings: serial: amlogic,meson-uart: Add compatible string for A9 dt-bindings: serial: atmel,at91-usart: add microchip,lan9691-usart serial: auart: check clk_enable() return in console write ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/serdev.h9
-rw-r--r--include/linux/tty_buffer.h1
-rw-r--r--include/linux/tty_driver.h7
-rw-r--r--include/linux/tty_ldisc.h6
-rw-r--r--include/linux/tty_port.h13
-rw-r--r--include/uapi/linux/keyboard.h29
6 files changed, 58 insertions, 7 deletions
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index 188c0ba62d50..b6c3d957ec15 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -37,8 +37,8 @@ struct serdev_device_ops {
* @nr: Device number on serdev bus.
* @ctrl: serdev controller managing this device.
* @ops: Device operations.
- * @write_comp Completion used by serdev_device_write() internally
- * @write_lock Lock to serialize access when writing data
+ * @write_comp: Completion used by serdev_device_write() internally
+ * @write_lock: Lock to serialize access when writing data
*/
struct serdev_device {
struct device dev;
@@ -57,6 +57,7 @@ struct serdev_device {
* structure.
* @probe: binds this driver to a serdev device.
* @remove: unbinds this driver from the serdev device.
+ * @shutdown: shut down this serdev device.
*/
struct serdev_device_driver {
struct device_driver driver;
@@ -120,7 +121,7 @@ static inline void serdev_device_set_drvdata(struct serdev_device *serdev, void
/**
* serdev_device_put() - decrement serdev device refcount
- * @serdev serdev device.
+ * @serdev: serdev device.
*/
static inline void serdev_device_put(struct serdev_device *serdev)
{
@@ -148,7 +149,7 @@ static inline void serdev_controller_set_drvdata(struct serdev_controller *ctrl,
/**
* serdev_controller_put() - decrement controller refcount
- * @ctrl serdev controller.
+ * @ctrl: serdev controller.
*/
static inline void serdev_controller_put(struct serdev_controller *ctrl)
{
diff --git a/include/linux/tty_buffer.h b/include/linux/tty_buffer.h
index 31125e3be3c5..48adcb0e8ff3 100644
--- a/include/linux/tty_buffer.h
+++ b/include/linux/tty_buffer.h
@@ -34,6 +34,7 @@ static inline u8 *flag_buf_ptr(struct tty_buffer *b, unsigned int ofs)
struct tty_bufhead {
struct tty_buffer *head; /* Queue head */
+ struct workqueue_struct *flip_wq;
struct work_struct work;
struct mutex lock;
atomic_t priority;
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 188ee9b768eb..1f2896e56e77 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -69,6 +69,10 @@ struct serial_struct;
* Do not create numbered ``/dev`` nodes. For example, create
* ``/dev/ttyprintk`` and not ``/dev/ttyprintk0``. Applicable only when a
* driver for a single tty device is being allocated.
+ *
+ * @TTY_DRIVER_NO_WORKQUEUE:
+ * Do not create workqueue when tty_register_driver(). Whenever set, flip
+ * buffer workqueue can be set by tty_port_link_wq() for every port.
*/
enum tty_driver_flag {
TTY_DRIVER_INSTALLED = BIT(0),
@@ -79,6 +83,7 @@ enum tty_driver_flag {
TTY_DRIVER_HARDWARE_BREAK = BIT(5),
TTY_DRIVER_DYNAMIC_ALLOC = BIT(6),
TTY_DRIVER_UNNUMBERED_NODE = BIT(7),
+ TTY_DRIVER_NO_WORKQUEUE = BIT(8),
};
enum tty_driver_type {
@@ -506,6 +511,7 @@ struct tty_operations {
* @flags: tty driver flags (%TTY_DRIVER_)
* @proc_entry: proc fs entry, used internally
* @other: driver of the linked tty; only used for the PTY driver
+ * @flip_wq: workqueue to queue flip buffer work on
* @ttys: array of active &struct tty_struct, set by tty_standard_install()
* @ports: array of &struct tty_port; can be set during initialization by
* tty_port_link_device() and similar
@@ -539,6 +545,7 @@ struct tty_driver {
unsigned long flags;
struct proc_dir_entry *proc_entry;
struct tty_driver *other;
+ struct workqueue_struct *flip_wq;
/*
* Pointer to the tty data structures
diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h
index c5cccc3fc1e8..d227a58e3e49 100644
--- a/include/linux/tty_ldisc.h
+++ b/include/linux/tty_ldisc.h
@@ -266,7 +266,7 @@ struct tty_ldisc_ops {
};
struct tty_ldisc {
- struct tty_ldisc_ops *ops;
+ const struct tty_ldisc_ops *ops;
struct tty_struct *tty;
};
@@ -281,8 +281,8 @@ struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *);
void tty_ldisc_flush(struct tty_struct *tty);
-int tty_register_ldisc(struct tty_ldisc_ops *new_ldisc);
-void tty_unregister_ldisc(struct tty_ldisc_ops *ldisc);
+int tty_register_ldisc(const struct tty_ldisc_ops *new_ldisc);
+void tty_unregister_ldisc(const struct tty_ldisc_ops *ldisc);
int tty_set_ldisc(struct tty_struct *tty, int disc);
#endif /* _LINUX_TTY_LDISC_H */
diff --git a/include/linux/tty_port.h b/include/linux/tty_port.h
index 660c254f1efe..d2a7882c0b58 100644
--- a/include/linux/tty_port.h
+++ b/include/linux/tty_port.h
@@ -138,6 +138,7 @@ struct tty_port {
kernel */
void tty_port_init(struct tty_port *port);
+void tty_port_link_wq(struct tty_port *port, struct workqueue_struct *flip_wq);
void tty_port_link_device(struct tty_port *port, struct tty_driver *driver,
unsigned index);
struct device *tty_port_register_device(struct tty_port *port,
@@ -165,6 +166,18 @@ static inline struct tty_port *tty_port_get(struct tty_port *port)
return NULL;
}
+/*
+ * Never overwrite the workqueue set by tty_port_link_wq().
+ * No effect when %TTY_DRIVER_NO_WORKQUEUE is set, as driver->flip_wq is
+ * %NULL.
+ */
+static inline void tty_port_link_driver_wq(struct tty_port *port,
+ struct tty_driver *driver)
+{
+ if (!port->buf.flip_wq)
+ tty_port_link_wq(port, driver->flip_wq);
+}
+
/* If the cts flow control is enabled, return true. */
static inline bool tty_port_cts_enabled(const struct tty_port *port)
{
diff --git a/include/uapi/linux/keyboard.h b/include/uapi/linux/keyboard.h
index 36d230cedf12..48ecb0cefb45 100644
--- a/include/uapi/linux/keyboard.h
+++ b/include/uapi/linux/keyboard.h
@@ -41,6 +41,7 @@
#define KT_SLOCK 12
#define KT_DEAD2 13
#define KT_BRL 14
+#define KT_CSI 15 /* CSI sequences with modifier support */
#define K(t,v) (((t)<<8)|(v))
#define KTYP(x) ((x) >> 8)
@@ -461,5 +462,33 @@
#define NR_BRL 11
+/* KT_CSI keys: value is the CSI parameter number for ESC [ <value> ~ */
+#define K_CSI_HOME K(KT_CSI, 1) /* ESC [ 1 ~ */
+#define K_CSI_INSERT K(KT_CSI, 2) /* ESC [ 2 ~ */
+#define K_CSI_DELETE K(KT_CSI, 3) /* ESC [ 3 ~ */
+#define K_CSI_END K(KT_CSI, 4) /* ESC [ 4 ~ */
+#define K_CSI_PGUP K(KT_CSI, 5) /* ESC [ 5 ~ */
+#define K_CSI_PGDN K(KT_CSI, 6) /* ESC [ 6 ~ */
+#define K_CSI_F1 K(KT_CSI, 11) /* ESC [ 11 ~ */
+#define K_CSI_F2 K(KT_CSI, 12) /* ESC [ 12 ~ */
+#define K_CSI_F3 K(KT_CSI, 13) /* ESC [ 13 ~ */
+#define K_CSI_F4 K(KT_CSI, 14) /* ESC [ 14 ~ */
+#define K_CSI_F5 K(KT_CSI, 15) /* ESC [ 15 ~ */
+#define K_CSI_F6 K(KT_CSI, 17) /* ESC [ 17 ~ */
+#define K_CSI_F7 K(KT_CSI, 18) /* ESC [ 18 ~ */
+#define K_CSI_F8 K(KT_CSI, 19) /* ESC [ 19 ~ */
+#define K_CSI_F9 K(KT_CSI, 20) /* ESC [ 20 ~ */
+#define K_CSI_F10 K(KT_CSI, 21) /* ESC [ 21 ~ */
+#define K_CSI_F11 K(KT_CSI, 23) /* ESC [ 23 ~ */
+#define K_CSI_F12 K(KT_CSI, 24) /* ESC [ 24 ~ */
+#define K_CSI_F13 K(KT_CSI, 25) /* ESC [ 25 ~ */
+#define K_CSI_F14 K(KT_CSI, 26) /* ESC [ 26 ~ */
+#define K_CSI_F15 K(KT_CSI, 28) /* ESC [ 28 ~ */
+#define K_CSI_F16 K(KT_CSI, 29) /* ESC [ 29 ~ */
+#define K_CSI_F17 K(KT_CSI, 31) /* ESC [ 31 ~ */
+#define K_CSI_F18 K(KT_CSI, 32) /* ESC [ 32 ~ */
+#define K_CSI_F19 K(KT_CSI, 33) /* ESC [ 33 ~ */
+#define K_CSI_F20 K(KT_CSI, 34) /* ESC [ 34 ~ */
+
#define MAX_DIACR 256
#endif /* _UAPI__LINUX_KEYBOARD_H */