summaryrefslogtreecommitdiff
path: root/backport-include/linux/tty.h
diff options
context:
space:
mode:
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>2020-03-26 12:44:27 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2020-03-26 12:46:50 +0200
commit87d308708712ff6075c4dd54b0519b47fdad8816 (patch)
tree2fb6458b1db7dd21be2648f42412dd2485846c76 /backport-include/linux/tty.h
Backports v5.4.27
Backports generated by toradex backports f6e8852f1ef28e6d3c9bae8400eb6a87a6b0c3e7 against mainline kernel tag v5.4.27 Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'backport-include/linux/tty.h')
-rw-r--r--backport-include/linux/tty.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/backport-include/linux/tty.h b/backport-include/linux/tty.h
new file mode 100644
index 0000000..987a115
--- /dev/null
+++ b/backport-include/linux/tty.h
@@ -0,0 +1,36 @@
+#ifndef __BACKPORT_LINUX_TTY_H
+#define __BACKPORT_LINUX_TTY_H
+#include_next <linux/tty.h>
+
+/*
+ * This really belongs into uapi/asm-generic/termbits.h but
+ * that doesn't usually get included directly.
+ */
+#ifndef EXTPROC
+#define EXTPROC 0200000
+#endif
+
+#if LINUX_VERSION_IS_LESS(3,7,0)
+/* Backports tty_lock: Localise the lock */
+#define tty_lock(__tty) tty_lock()
+#define tty_unlock(__tty) tty_unlock()
+
+#define tty_port_register_device(port, driver, index, device) \
+ tty_register_device(driver, index, device)
+#endif
+
+#if LINUX_VERSION_IS_LESS(3,10,0)
+extern void tty_port_tty_wakeup(struct tty_port *port);
+extern void tty_port_tty_hangup(struct tty_port *port, bool check_clocal);
+#endif /* LINUX_VERSION_IS_LESS(3,10,0) */
+
+#if LINUX_VERSION_IS_LESS(4,1,0) && \
+ LINUX_VERSION_IS_GEQ(4,0,0)
+extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
+#endif /* LINUX_VERSION_IS_LESS(4,1,0) */
+
+#ifndef N_NCI
+#define N_NCI 25 /* NFC NCI UART */
+#endif
+
+#endif /* __BACKPORT_LINUX_TTY_H */