linux/include/uapi/linux/tty_flags.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _LINUX_TTY_FLAGS_H
#define _LINUX_TTY_FLAGS_H

/*
 * Definitions for async_struct (and serial_struct) flags field also
 * shared by the tty_port flags structures.
 *
 * Define ASYNCB_* for convenient use with {test,set,clear}_bit.
 *
 * Bits [0..ASYNCB_LAST_USER] are userspace defined/visible/changeable
 * [x] in the bit comments indicates the flag is defunct and no longer used.
 */
#define ASYNCB_HUP_NOTIFY
#define ASYNCB_FOURPORT
#define ASYNCB_SAK
#define ASYNCB_SPLIT_TERMIOS
#define ASYNCB_SPD_HI
#define ASYNCB_SPD_VHI
#define ASYNCB_SKIP_TEST
#define ASYNCB_AUTO_IRQ
#define ASYNCB_SESSION_LOCKOUT
#define ASYNCB_PGRP_LOCKOUT
#define ASYNCB_CALLOUT_NOHUP
#define ASYNCB_HARDPPS_CD
#define ASYNCB_SPD_SHI
#define ASYNCB_LOW_LATENCY
#define ASYNCB_BUGGY_UART
#define ASYNCB_AUTOPROBE
#define ASYNCB_MAGIC_MULTIPLIER
#define ASYNCB_LAST_USER

/*
 * Internal flags used only by kernel (read-only)
 *
 * WARNING: These flags are no longer used and have been superceded by the
 *	    TTY_PORT_ flags in the iflags field (and not userspace-visible)
 */
#ifndef __KERNEL__
#define ASYNCB_INITIALIZED
#define ASYNCB_SUSPENDED
#define ASYNCB_NORMAL_ACTIVE
#define ASYNCB_BOOT_AUTOCONF
#define ASYNCB_CLOSING
#define ASYNCB_CTS_FLOW
#define ASYNCB_CHECK_CD
#define ASYNCB_SHARE_IRQ
#define ASYNCB_CONS_FLOW
#define ASYNCB_FIRST_KERNEL
#endif

/* Masks */
#define ASYNC_HUP_NOTIFY
#define ASYNC_SUSPENDED
#define ASYNC_FOURPORT
#define ASYNC_SAK
#define ASYNC_SPLIT_TERMIOS
#define ASYNC_SPD_HI
#define ASYNC_SPD_VHI
#define ASYNC_SKIP_TEST
#define ASYNC_AUTO_IRQ
#define ASYNC_SESSION_LOCKOUT
#define ASYNC_PGRP_LOCKOUT
#define ASYNC_CALLOUT_NOHUP
#define ASYNC_HARDPPS_CD
#define ASYNC_SPD_SHI
#define ASYNC_LOW_LATENCY
#define ASYNC_BUGGY_UART
#define ASYNC_AUTOPROBE
#define ASYNC_MAGIC_MULTIPLIER

#define ASYNC_FLAGS
#define ASYNC_DEPRECATED
#define ASYNC_USR_MASK
#define ASYNC_SPD_CUST
#define ASYNC_SPD_WARP
#define ASYNC_SPD_MASK

#ifndef __KERNEL__
/* These flags are no longer used (and were always masked from userspace) */
#define ASYNC_INITIALIZED
#define ASYNC_NORMAL_ACTIVE
#define ASYNC_BOOT_AUTOCONF
#define ASYNC_CLOSING
#define ASYNC_CTS_FLOW
#define ASYNC_CHECK_CD
#define ASYNC_SHARE_IRQ
#define ASYNC_CONS_FLOW
#define ASYNC_INTERNAL_FLAGS
#endif

#endif