18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 48c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 58c2ecf20Sopenharmony_ci * for more details. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 1995, 1996, 2001 Ralf Baechle 88c2ecf20Sopenharmony_ci * Copyright (C) 2001 MIPS Technologies, Inc. 98c2ecf20Sopenharmony_ci */ 108c2ecf20Sopenharmony_ci#ifndef __ASM_IOCTLS_H 118c2ecf20Sopenharmony_ci#define __ASM_IOCTLS_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <asm/ioctl.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#define TCGETA 0x5401 168c2ecf20Sopenharmony_ci#define TCSETA 0x5402 /* Clashes with SNDCTL_TMR_START sound ioctl */ 178c2ecf20Sopenharmony_ci#define TCSETAW 0x5403 188c2ecf20Sopenharmony_ci#define TCSETAF 0x5404 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define TCSBRK 0x5405 218c2ecf20Sopenharmony_ci#define TCXONC 0x5406 228c2ecf20Sopenharmony_ci#define TCFLSH 0x5407 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define TCGETS 0x540d 258c2ecf20Sopenharmony_ci#define TCSETS 0x540e 268c2ecf20Sopenharmony_ci#define TCSETSW 0x540f 278c2ecf20Sopenharmony_ci#define TCSETSF 0x5410 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define TIOCEXCL 0x740d /* set exclusive use of tty */ 308c2ecf20Sopenharmony_ci#define TIOCNXCL 0x740e /* reset exclusive use of tty */ 318c2ecf20Sopenharmony_ci#define TIOCOUTQ 0x7472 /* output queue size */ 328c2ecf20Sopenharmony_ci#define TIOCSTI 0x5472 /* simulate terminal input */ 338c2ecf20Sopenharmony_ci#define TIOCMGET 0x741d /* get all modem bits */ 348c2ecf20Sopenharmony_ci#define TIOCMBIS 0x741b /* bis modem bits */ 358c2ecf20Sopenharmony_ci#define TIOCMBIC 0x741c /* bic modem bits */ 368c2ecf20Sopenharmony_ci#define TIOCMSET 0x741a /* set all modem bits */ 378c2ecf20Sopenharmony_ci#define TIOCPKT 0x5470 /* pty: set/clear packet mode */ 388c2ecf20Sopenharmony_ci#define TIOCPKT_DATA 0x00 /* data packet */ 398c2ecf20Sopenharmony_ci#define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ 408c2ecf20Sopenharmony_ci#define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ 418c2ecf20Sopenharmony_ci#define TIOCPKT_STOP 0x04 /* stop output */ 428c2ecf20Sopenharmony_ci#define TIOCPKT_START 0x08 /* start output */ 438c2ecf20Sopenharmony_ci#define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ 448c2ecf20Sopenharmony_ci#define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ 458c2ecf20Sopenharmony_ci#define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ 468c2ecf20Sopenharmony_ci#define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ 478c2ecf20Sopenharmony_ci#define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ 488c2ecf20Sopenharmony_ci#define TIOCNOTTY 0x5471 /* void tty association */ 498c2ecf20Sopenharmony_ci#define TIOCSETD 0x7401 508c2ecf20Sopenharmony_ci#define TIOCGETD 0x7400 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci#define FIOCLEX 0x6601 538c2ecf20Sopenharmony_ci#define FIONCLEX 0x6602 548c2ecf20Sopenharmony_ci#define FIOASYNC 0x667d 558c2ecf20Sopenharmony_ci#define FIONBIO 0x667e 568c2ecf20Sopenharmony_ci#define FIOQSIZE 0x667f 578c2ecf20Sopenharmony_ci 588c2ecf20Sopenharmony_ci#define TIOCGLTC 0x7474 /* get special local chars */ 598c2ecf20Sopenharmony_ci#define TIOCSLTC 0x7475 /* set special local chars */ 608c2ecf20Sopenharmony_ci#define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ 618c2ecf20Sopenharmony_ci#define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ 628c2ecf20Sopenharmony_ci#define TIOCCONS _IOW('t', 120, int) /* become virtual console */ 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define FIONREAD 0x467f 658c2ecf20Sopenharmony_ci#define TIOCINQ FIONREAD 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci#define TIOCGETP 0x7408 688c2ecf20Sopenharmony_ci#define TIOCSETP 0x7409 698c2ecf20Sopenharmony_ci#define TIOCSETN 0x740a /* TIOCSETP wo flush */ 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci/* #define TIOCSETA _IOW('t', 20, struct termios) set termios struct */ 728c2ecf20Sopenharmony_ci/* #define TIOCSETAW _IOW('t', 21, struct termios) drain output, set */ 738c2ecf20Sopenharmony_ci/* #define TIOCSETAF _IOW('t', 22, struct termios) drn out, fls in, set */ 748c2ecf20Sopenharmony_ci/* #define TIOCGETD _IOR('t', 26, int) get line discipline */ 758c2ecf20Sopenharmony_ci/* #define TIOCSETD _IOW('t', 27, int) set line discipline */ 768c2ecf20Sopenharmony_ci /* 127-124 compat */ 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci#define TIOCSBRK 0x5427 /* BSD compatibility */ 798c2ecf20Sopenharmony_ci#define TIOCCBRK 0x5428 /* BSD compatibility */ 808c2ecf20Sopenharmony_ci#define TIOCGSID 0x7416 /* Return the session ID of FD */ 818c2ecf20Sopenharmony_ci#define TCGETS2 _IOR('T', 0x2A, struct termios2) 828c2ecf20Sopenharmony_ci#define TCSETS2 _IOW('T', 0x2B, struct termios2) 838c2ecf20Sopenharmony_ci#define TCSETSW2 _IOW('T', 0x2C, struct termios2) 848c2ecf20Sopenharmony_ci#define TCSETSF2 _IOW('T', 0x2D, struct termios2) 858c2ecf20Sopenharmony_ci#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485) 868c2ecf20Sopenharmony_ci#define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485) 878c2ecf20Sopenharmony_ci#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 888c2ecf20Sopenharmony_ci#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ 898c2ecf20Sopenharmony_ci#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */ 908c2ecf20Sopenharmony_ci#define TIOCSIG _IOW('T', 0x36, int) /* Generate signal on Pty slave */ 918c2ecf20Sopenharmony_ci#define TIOCVHANGUP 0x5437 928c2ecf20Sopenharmony_ci#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */ 938c2ecf20Sopenharmony_ci#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */ 948c2ecf20Sopenharmony_ci#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */ 958c2ecf20Sopenharmony_ci#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */ 968c2ecf20Sopenharmony_ci#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) 978c2ecf20Sopenharmony_ci#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci/* I hope the range from 0x5480 on is free ... */ 1008c2ecf20Sopenharmony_ci#define TIOCSCTTY 0x5480 /* become controlling tty */ 1018c2ecf20Sopenharmony_ci#define TIOCGSOFTCAR 0x5481 1028c2ecf20Sopenharmony_ci#define TIOCSSOFTCAR 0x5482 1038c2ecf20Sopenharmony_ci#define TIOCLINUX 0x5483 1048c2ecf20Sopenharmony_ci#define TIOCGSERIAL 0x5484 1058c2ecf20Sopenharmony_ci#define TIOCSSERIAL 0x5485 1068c2ecf20Sopenharmony_ci#define TCSBRKP 0x5486 /* Needed for POSIX tcsendbreak() */ 1078c2ecf20Sopenharmony_ci#define TIOCSERCONFIG 0x5488 1088c2ecf20Sopenharmony_ci#define TIOCSERGWILD 0x5489 1098c2ecf20Sopenharmony_ci#define TIOCSERSWILD 0x548a 1108c2ecf20Sopenharmony_ci#define TIOCGLCKTRMIOS 0x548b 1118c2ecf20Sopenharmony_ci#define TIOCSLCKTRMIOS 0x548c 1128c2ecf20Sopenharmony_ci#define TIOCSERGSTRUCT 0x548d /* For debugging only */ 1138c2ecf20Sopenharmony_ci#define TIOCSERGETLSR 0x548e /* Get line status register */ 1148c2ecf20Sopenharmony_ci#define TIOCSERGETMULTI 0x548f /* Get multiport config */ 1158c2ecf20Sopenharmony_ci#define TIOCSERSETMULTI 0x5490 /* Set multiport config */ 1168c2ecf20Sopenharmony_ci#define TIOCMIWAIT 0x5491 /* wait for a change on serial input line(s) */ 1178c2ecf20Sopenharmony_ci#define TIOCGICOUNT 0x5492 /* read serial port inline interrupt counts */ 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci#endif /* __ASM_IOCTLS_H */ 120