요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
TIOCGSERIAL 속성
sysfs-tty:21-144UART clock, type, line, I/O address, IRQ, flags, FIFO, close timing과 I/O memory 배치를 sysfs에서 읽을 수 있게 합니다.
RX trigger와 console 연결
sysfs-tty:145-166RX FIFO interrupt trigger를 device가 지원하는 값으로 조정하고 serial device의 kernel console 연결을 제어합니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
What: /sys/class/tty/console/active
Date: Nov 2010
Contact: Kay Sievers <[email protected]>
Description:
Shows the list of currently configured
console devices, like 'tty1 ttyS0'.
The last entry in the file is the active
device connected to /dev/console.
The file supports poll() to detect virtual
console switches.
What: /sys/class/tty/tty<x>/active
Date: Nov 2010
Contact: Kay Sievers <[email protected]>
Description:
Shows the currently active virtual console
device, like 'tty1'.
The file supports poll() to detect virtual
console switches.
What: /sys/class/tty/ttyS<x>/uartclk
Date: Sep 2012
Contact: Tomas Hlavacek <[email protected]>
Description:
Shows the current uartclk value associated with the
UART port in serial_core, that is bound to TTY like ttyS0.
uartclk = 16 * baud_base
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/type
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Shows the current tty type for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/line
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Shows the current tty line number for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/port
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Shows the current tty port I/O address for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/irq
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Shows the current primary interrupt for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/flags
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the tty port status flags for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/xmit_fifo_size
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the transmit FIFO size for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/close_delay
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the closing delay time for this port in centiseconds.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/closing_wait
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the close wait time for this port in centiseconds.
Waiting forever is represented as 0. If waiting on close is
disabled then the value is 65535.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/custom_divisor
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the custom divisor if any that is set on this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/io_type
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the I/O type that is to be used with the iomem base
address.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/iomem_base
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
The I/O memory base for this port.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/iomem_reg_shift
Date: October 2012
Contact: Alan Cox <[email protected]>
Description:
Show the register shift indicating the spacing to be used
for accesses on this iomem address.
These sysfs values expose the TIOCGSERIAL interface via
sysfs rather than via ioctls.
What: /sys/class/tty/ttyS<x>/rx_trig_bytes
Date: May 2014
Contact: Yoshihiro YUNOMAE <[email protected]>
Description:
Shows current RX interrupt trigger bytes or sets the
user specified value to change it for the FIFO buffer.
Users can show or set this value regardless of opening the
serial device file or not.
The RX trigger can be set one of four kinds of values for UART
serials. When users input a meaning less value to this I/F,
the RX trigger is changed to the nearest lower value for the
device specification. For example, when user sets 7bytes on
16550A, which has 1/4/8/14 bytes trigger, the RX trigger is
automatically changed to 4 bytes.
What: /sys/class/tty/ttyS<x>/console
Date: February 2020
Contact: Andy Shevchenko <[email protected]>
Description:
Allows user to detach or attach back the given device as
kernel console. It shows and accepts a boolean variable.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
TTY와 serial port sysfs ABI: active
1-11| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/console/active |
| Date | 2010년 11월 |
| Contact | Kay Sievers <[email protected]> |
| Description | `/sys/class/tty/console/active`는 현재 구성된 console device 목록을 `tty1 ttyS0` 같은 형식으로 표시합니다. 파일의 마지막 항목은 `/dev/console`에 연결된 active device입니다. 이 파일은 virtual console 전환을 감지할 수 있도록 `poll()`을 지원합니다. |
목록의 순서와 마지막 항목이 `/dev/console` 연결을 나타냅니다.
TTY와 serial port sysfs ABI: active
12-20| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/tty<x>/active |
| Date | 2010년 11월 |
| Contact | Kay Sievers <[email protected]> |
| Description | `/sys/class/tty/tty<x>/active`는 `tty1`처럼 현재 active 상태인 virtual console device를 표시합니다. 이 파일은 virtual console 전환을 감지할 수 있도록 `poll()`을 지원합니다. |
TTY와 serial port sysfs ABI: uartclk
21-31| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/uartclk |
| Date | 2012년 9월 |
| Contact | Tomas Hlavacek <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/uartclk`는 serial_core에서 해당 UART port와 연결되고 `ttyS0` 같은 TTY에 bind된 현재 `uartclk` 값을 표시합니다. 관계식은 `uartclk = 16 * baud_base`입니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TIOCGSERIAL information을 sysfs attribute별로 정리합니다.
TTY와 serial port sysfs ABI: type
32-40| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/type |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/type`은 이 port의 현재 TTY type을 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: line
41-49| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/line |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/line`은 이 port의 현재 TTY line number를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: port
50-58| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/port |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/port`는 이 TTY port의 현재 I/O address를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: irq
59-67| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/irq |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/irq`는 이 port의 현재 primary interrupt를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: flags
68-76| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/flags |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/flags`는 이 TTY port의 status flags를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: xmit fifo size
77-85| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/xmit_fifo_size |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/xmit_fifo_size`는 이 port의 transmit FIFO size를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: close delay
86-94| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/close_delay |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/close_delay`는 이 port의 close delay time을 centiseconds 단위로 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
Close delay와 wait의 단위 및 special values를 구분합니다.
TTY와 serial port sysfs ABI: closing wait
95-106| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/closing_wait |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/closing_wait`는 이 port가 close될 때 기다리는 시간을 centiseconds 단위로 표시합니다. 무한 대기는 `0`, close 대기를 disable한 상태는 `65535`로 나타냅니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: custom divisor
107-115| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/custom_divisor |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/custom_divisor`는 이 port에 설정된 custom divisor가 있으면 그 값을 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: io type
116-125| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/io_type |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/io_type`은 I/O memory base address와 함께 사용할 I/O type을 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
Memory-mapped serial register 접근에 필요한 값을 묶어 봅니다.
TTY와 serial port sysfs ABI: iomem base
126-134| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/iomem_base |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/iomem_base`는 이 port의 I/O memory base를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: iomem reg shift
135-144| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/iomem_reg_shift |
| Date | 2012년 10월 |
| Contact | Alan Cox <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/iomem_reg_shift`는 이 I/O memory address에 접근할 때 사용할 register 간격을 나타내는 register shift를 표시합니다. 이 sysfs 값은 ioctl 대신 sysfs를 통해 `TIOCGSERIAL` interface를 노출합니다. |
TTY와 serial port sysfs ABI: rx trig bytes
145-160| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/rx_trig_bytes |
| Date | 2014년 5월 |
| Contact | Yoshihiro YUNOMAE <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/rx_trig_bytes`는 현재 RX interrupt trigger byte 수를 표시하거나 FIFO buffer의 trigger를 바꾸기 위해 사용자가 지정한 값을 설정합니다. Serial device file의 open 여부와 관계없이 이 값을 조회하거나 설정할 수 있습니다. UART serial의 RX trigger는 네 가지 값 가운데 하나로 설정할 수 있습니다. 사용자가 이 interface에 의미 없는 값을 쓰면 device specification에서 그 값보다 작거나 같은 가장 가까운 trigger 값으로 자동 조정됩니다. 예를 들어 trigger가 `1/4/8/14` byte인 16550A에 `7` byte를 설정하면 RX trigger는 자동으로 `4` byte가 됩니다. |
지원하지 않는 입력은 device가 지원하는 가장 가까운 lower value로 내립니다.
TTY와 serial port sysfs ABI: console
161-166| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/class/tty/ttyS<x>/console |
| Date | 2020년 2월 |
| Contact | Andy Shevchenko <[email protected]> |
| Description | `/sys/class/tty/ttyS<x>/console`은 지정한 device를 kernel console에서 detach하거나 다시 attach할 수 있게 합니다. Boolean 값을 표시하고 입력으로도 받습니다. |
Boolean attribute의 read/write 의미입니다.
Active console 조회
sysfs-tty:1-20Console 목록과 현재 virtual console을 노출하고 poll()로 console 전환을 감지합니다.