diff options
Diffstat (limited to 'include/linux/serial_core.h')
| -rw-r--r-- | include/linux/serial_core.h | 32 | 
1 files changed, 24 insertions, 8 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 3c430228d23..87d4bbc773f 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -29,7 +29,6 @@  #include <linux/tty.h>  #include <linux/mutex.h>  #include <linux/sysrq.h> -#include <linux/pps_kernel.h>  #include <uapi/linux/serial_core.h>  struct uart_port; @@ -37,8 +36,8 @@ struct serial_struct;  struct device;  /* - * This structure describes all the operations that can be - * done on the physical hardware. + * This structure describes all the operations that can be done on the + * physical hardware.  See Documentation/serial/driver for details.   */  struct uart_ops {  	unsigned int	(*tx_empty)(struct uart_port *); @@ -46,6 +45,8 @@ struct uart_ops {  	unsigned int	(*get_mctrl)(struct uart_port *);  	void		(*stop_tx)(struct uart_port *);  	void		(*start_tx)(struct uart_port *); +	void		(*throttle)(struct uart_port *); +	void		(*unthrottle)(struct uart_port *);  	void		(*send_xchar)(struct uart_port *, char ch);  	void		(*stop_rx)(struct uart_port *);  	void		(*enable_ms)(struct uart_port *); @@ -63,7 +64,7 @@ struct uart_ops {  	/*  	 * Return a string describing the type of the port  	 */ -	const char *(*type)(struct uart_port *); +	const char	*(*type)(struct uart_port *);  	/*  	 * Release IO and memory resources used by the port. @@ -81,7 +82,7 @@ struct uart_ops {  	int		(*ioctl)(struct uart_port *, unsigned int, unsigned long);  #ifdef CONFIG_CONSOLE_POLL  	int		(*poll_init)(struct uart_port *); -	void	(*poll_put_char)(struct uart_port *, unsigned char); +	void		(*poll_put_char)(struct uart_port *, unsigned char);  	int		(*poll_get_char)(struct uart_port *);  #endif  }; @@ -132,9 +133,8 @@ struct uart_port {  #define UPIO_HUB6		(1)  #define UPIO_MEM		(2)  #define UPIO_MEM32		(3) -#define UPIO_AU			(4)			/* Au1x00 type IO */ +#define UPIO_AU			(4)			/* Au1x00 and RT288x type IO */  #define UPIO_TSI		(5)			/* Tsi108/109 type IO */ -#define UPIO_RM9000		(6)			/* RM9000 type IO */  	unsigned int		read_status_mask;	/* driver specific */  	unsigned int		ignore_status_mask;	/* driver specific */ @@ -163,6 +163,10 @@ struct uart_port {  #define UPF_BUGGY_UART		((__force upf_t) (1 << 14))  #define UPF_NO_TXEN_TEST	((__force upf_t) (1 << 15))  #define UPF_MAGIC_MULTIPLIER	((__force upf_t) (1 << 16)) +/* Port has hardware-assisted h/w flow control (iow, auto-RTS *not* auto-CTS) */ +#define UPF_HARD_FLOW		((__force upf_t) (1 << 21)) +/* Port has hardware-assisted s/w flow control */ +#define UPF_SOFT_FLOW		((__force upf_t) (1 << 22))  #define UPF_CONS_FLOW		((__force upf_t) (1 << 23))  #define UPF_SHARE_IRQ		((__force upf_t) (1 << 24))  #define UPF_EXAR_EFR		((__force upf_t) (1 << 25)) @@ -202,13 +206,25 @@ static inline void serial_port_out(struct uart_port *up, int offset, int value)  	up->serial_out(up, offset, value);  } +/** + * enum uart_pm_state - power states for UARTs + * @UART_PM_STATE_ON: UART is powered, up and operational + * @UART_PM_STATE_OFF: UART is powered off + * @UART_PM_STATE_UNDEFINED: sentinel + */ +enum uart_pm_state { +	UART_PM_STATE_ON = 0, +	UART_PM_STATE_OFF = 3, /* number taken from ACPI */ +	UART_PM_STATE_UNDEFINED, +}; +  /*   * This is the state information which is persistent across opens.   */  struct uart_state {  	struct tty_port		port; -	int			pm_state; +	enum uart_pm_state	pm_state;  	struct circ_buf		xmit;  	struct uart_port	*uart_port;  |