master
  1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2/*
  3 * This file is subject to the terms and conditions of the GNU General Public
  4 * License.  See the file "COPYING" in the main directory of this archive
  5 * for more details.
  6 *
  7 * Copyright (C) 1995, 1996, 2001 Ralf Baechle
  8 * Copyright (C) 2001 MIPS Technologies, Inc.
  9 */
 10#ifndef __ASM_IOCTLS_H
 11#define __ASM_IOCTLS_H
 12
 13#include <asm/ioctl.h>
 14
 15#define TCGETA		0x5401
 16#define TCSETA		0x5402	/* Clashes with SNDCTL_TMR_START sound ioctl */
 17#define TCSETAW		0x5403
 18#define TCSETAF		0x5404
 19
 20#define TCSBRK		0x5405
 21#define TCXONC		0x5406
 22#define TCFLSH		0x5407
 23
 24#define TCGETS		0x540d
 25#define TCSETS		0x540e
 26#define TCSETSW		0x540f
 27#define TCSETSF		0x5410
 28
 29#define TIOCEXCL	0x740d		/* set exclusive use of tty */
 30#define TIOCNXCL	0x740e		/* reset exclusive use of tty */
 31#define TIOCOUTQ	0x7472		/* output queue size */
 32#define TIOCSTI		0x5472		/* simulate terminal input */
 33#define TIOCMGET	0x741d		/* get all modem bits */
 34#define TIOCMBIS	0x741b		/* bis modem bits */
 35#define TIOCMBIC	0x741c		/* bic modem bits */
 36#define TIOCMSET	0x741a		/* set all modem bits */
 37#define TIOCPKT		0x5470		/* pty: set/clear packet mode */
 38#define	 TIOCPKT_DATA		0x00	/* data packet */
 39#define	 TIOCPKT_FLUSHREAD	0x01	/* flush packet */
 40#define	 TIOCPKT_FLUSHWRITE	0x02	/* flush packet */
 41#define	 TIOCPKT_STOP		0x04	/* stop output */
 42#define	 TIOCPKT_START		0x08	/* start output */
 43#define	 TIOCPKT_NOSTOP		0x10	/* no more ^S, ^Q */
 44#define	 TIOCPKT_DOSTOP		0x20	/* now do ^S ^Q */
 45#define	 TIOCPKT_IOCTL		0x40	/* state change of pty driver */
 46#define TIOCSWINSZ	_IOW('t', 103, struct winsize)	/* set window size */
 47#define TIOCGWINSZ	_IOR('t', 104, struct winsize)	/* get window size */
 48#define TIOCNOTTY	0x5471		/* void tty association */
 49#define TIOCSETD	0x7401
 50#define TIOCGETD	0x7400
 51
 52#define FIOCLEX		0x6601
 53#define FIONCLEX	0x6602
 54#define FIOASYNC	0x667d
 55#define FIONBIO		0x667e
 56#define FIOQSIZE	0x667f
 57
 58#define TIOCGLTC	0x7474			/* get special local chars */
 59#define TIOCSLTC	0x7475			/* set special local chars */
 60#define TIOCSPGRP	_IOW('t', 118, int)	/* set pgrp of tty */
 61#define TIOCGPGRP	_IOR('t', 119, int)	/* get pgrp of tty */
 62#define TIOCCONS	_IOW('t', 120, int)	/* become virtual console */
 63
 64#define FIONREAD	0x467f
 65#define TIOCINQ		FIONREAD
 66
 67#define TIOCGETP	0x7408
 68#define TIOCSETP	0x7409
 69#define TIOCSETN	0x740a			/* TIOCSETP wo flush */
 70
 71/* #define TIOCSETA	_IOW('t', 20, struct termios) set termios struct */
 72/* #define TIOCSETAW	_IOW('t', 21, struct termios) drain output, set */
 73/* #define TIOCSETAF	_IOW('t', 22, struct termios) drn out, fls in, set */
 74/* #define TIOCGETD	_IOR('t', 26, int)	get line discipline */
 75/* #define TIOCSETD	_IOW('t', 27, int)	set line discipline */
 76						/* 127-124 compat */
 77
 78#define TIOCSBRK	0x5427	/* BSD compatibility */
 79#define TIOCCBRK	0x5428	/* BSD compatibility */
 80#define TIOCGSID	0x7416	/* Return the session ID of FD */
 81#define TCGETS2		_IOR('T', 0x2A, struct termios2)
 82#define TCSETS2		_IOW('T', 0x2B, struct termios2)
 83#define TCSETSW2	_IOW('T', 0x2C, struct termios2)
 84#define TCSETSF2	_IOW('T', 0x2D, struct termios2)
 85#define TIOCGRS485	_IOR('T', 0x2E, struct serial_rs485)
 86#define TIOCSRS485	_IOWR('T', 0x2F, struct serial_rs485)
 87#define TIOCGPTN	_IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
 88#define TIOCSPTLCK	_IOW('T', 0x31, int)  /* Lock/unlock Pty */
 89#define TIOCGDEV	_IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
 90#define TIOCSIG		_IOW('T', 0x36, int)  /* Generate signal on Pty slave */
 91#define TIOCVHANGUP	0x5437
 92#define TIOCGPKT	_IOR('T', 0x38, int) /* Get packet mode state */
 93#define TIOCGPTLCK	_IOR('T', 0x39, int) /* Get Pty lock state */
 94#define TIOCGEXCL	_IOR('T', 0x40, int) /* Get exclusive mode state */
 95#define TIOCGPTPEER	_IO('T', 0x41) /* Safely open the slave */
 96#define TIOCGISO7816	_IOR('T', 0x42, struct serial_iso7816)
 97#define TIOCSISO7816	_IOWR('T', 0x43, struct serial_iso7816)
 98
 99/* I hope the range from 0x5480 on is free ... */
100#define TIOCSCTTY	0x5480		/* become controlling tty */
101#define TIOCGSOFTCAR	0x5481
102#define TIOCSSOFTCAR	0x5482
103#define TIOCLINUX	0x5483
104#define TIOCGSERIAL	0x5484
105#define TIOCSSERIAL	0x5485
106#define TCSBRKP		0x5486	/* Needed for POSIX tcsendbreak() */
107#define TIOCSERCONFIG	0x5488
108#define TIOCSERGWILD	0x5489
109#define TIOCSERSWILD	0x548a
110#define TIOCGLCKTRMIOS	0x548b
111#define TIOCSLCKTRMIOS	0x548c
112#define TIOCSERGSTRUCT	0x548d /* For debugging only */
113#define TIOCSERGETLSR	0x548e /* Get line status register */
114#define TIOCSERGETMULTI 0x548f /* Get multiport config	*/
115#define TIOCSERSETMULTI 0x5490 /* Set multiport config */
116#define TIOCMIWAIT	0x5491 /* wait for a change on serial input line(s) */
117#define TIOCGICOUNT	0x5492 /* read serial port __inline__ interrupt counts */
118
119#endif /* __ASM_IOCTLS_H */