]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/accessibility/speakup/serialio.h
Merge tag 'sound-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[mirror_ubuntu-jammy-kernel.git] / drivers / accessibility / speakup / serialio.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
c6e3fd22
WH
2#ifndef _SPEAKUP_SERIAL_H
3#define _SPEAKUP_SERIAL_H
4
4b71598b 5#include <linux/serial.h> /* for rs_table, serial constants */
c6e3fd22 6#include <linux/serial_reg.h> /* for more serial constants */
ff59f2a6 7#include <linux/serial_core.h>
c6e3fd22 8
6b9ad1c7
OK
9#include "spk_priv.h"
10
3ee0017e
JS
11/*
12 * this is cut&paste from 8250.h. Get rid of the structure, the definitions
13 * and this whole broken driver.
14 */
15struct old_serial_port {
16 unsigned int uart; /* unused */
17 unsigned int baud_base;
18 unsigned int port;
19 unsigned int irq;
ff59f2a6 20 upf_t flags; /* unused */
3ee0017e
JS
21};
22
c6e3fd22 23/* countdown values for serial timeouts in us */
6b9ad1c7 24#define SPK_SERIAL_TIMEOUT SPK_SYNTH_TIMEOUT
c6e3fd22
WH
25/* countdown values transmitter/dsr timeouts in us */
26#define SPK_XMITR_TIMEOUT 100000
27/* countdown values cts timeouts in us */
28#define SPK_CTS_TIMEOUT 100000
29/* check ttyS0 ... ttyS3 */
30#define SPK_LO_TTY 0
31#define SPK_HI_TTY 3
32/* # of timeouts permitted before disable */
33#define NUM_DISABLE_TIMEOUTS 3
34/* buffer timeout in ms */
35#define SPK_TIMEOUT 100
36#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
37
63b8ebe4
SG
38#define spk_serial_tx_busy() \
39 ((inb(speakup_info.port_tts + UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY)
c6e3fd22 40
c6e3fd22 41#endif