요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /dev/gpiochip[0-9]+
2
Date: November 2015
3
KernelVersion: 4.4
4
Contact: [email protected]
5
Description:
6
The character device files /dev/gpiochip* are the interface
7
between GPIO chips and userspace.
9
The ioctl(2)-based ABI is defined in
10
[include/uapi]<linux/gpio.h> and documented in
11
Documentation/userspace-api/gpio/chardev.rst.
13
The following file operations are supported:
15
open(2)
16
Currently the only useful flags are O_RDWR.
18
ioctl(2)
19
Initiate various actions.
21
See Documentation/userspace-api/gpio/chardev.rst
22
for a description of all ioctls.
24
close(2)
25
Stops and free up the I/O contexts that was associated
26
with the file descriptor.
28
Users: TBD
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
/dev/gpiochip file-operation ABI
1-28| 항목 | 내용 |
|---|---|
| What | /dev/gpiochip[0-9]+ |
| Date | 2015년 11월 |
| KernelVersion | 4.4 |
| Contact | [email protected] |
| Description | Character device file /dev/gpiochip*는 GPIO chip과 userspace 사이의 interface입니다. |
| ABI definition | [include/uapi]<linux/gpio.h> |
| Documentation | Documentation/userspace-api/gpio/chardev.rst |
| Users | TBD |
| File operation | 전문 번역 |
|---|---|
| open(2) | 현재 유용한 flag는 O_RDWR뿐입니다. |
| ioctl(2) | 여러 action을 시작합니다. 모든 ioctl 설명은 Documentation/userspace-api/gpio/chardev.rst를 참조하십시오. |
| close(2) | File descriptor와 연결된 I/O context를 중지하고 해제합니다. |
GPIO chip→/dev/gpiochipN→open O_RDWR→ioctl actions→close→Stop and free I/O contexts
ABI contract→include/uapi/linux/gpio.h→userspace-api/gpio/chardev.rst
GPIO chip file descriptor를 열고 ioctl로 line operation을 수행한 뒤 close가 관련 I/O context를 정리한다.
GPIO chip file operations
gpio-cdev:1-28/dev/gpiochip*는 GPIO chip userspace interface입니다. 현재 유용한 open flag는 O_RDWR이고 ioctl로 action을 시작하며 close가 file descriptor와 연결된 I/O context를 중지·해제합니다.