← Documents Documentation/ABI/testing/gpio-cdev GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

GPIO character-device ABI

GPIO chip과 userspace 사이의 /dev/gpiochip* interface, O_RDWR open, ioctl action, close 시 I/O context 정리를 정의하고 관련 UAPI header와 문서를 연결합니다.

Source pathDocumentation/ABI/testing/gpio-cdev
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

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를 중지·해제합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /dev/gpiochip[0-9]+
2 Date: November 2015
3 KernelVersion: 4.4
4 Contact: linux-gpio@vger.kernel.org
5 Description:
6 The character device files /dev/gpiochip* are the interface
7 between GPIO chips and userspace.
8
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.
12
13 The following file operations are supported:
14
15 open(2)
16 Currently the only useful flags are O_RDWR.
17
18 ioctl(2)
19 Initiate various actions.
20
21 See Documentation/userspace-api/gpio/chardev.rst
22 for a description of all ioctls.
23
24 close(2)
25 Stops and free up the I/O contexts that was associated
26 with the file descriptor.
27
28 Users: TBD
29

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

/dev/gpiochip file-operation ABI

1-28
항목내용
What/dev/gpiochip[0-9]+
Date2015년 11월
KernelVersion4.4
Contactlinux-gpio@vger.kernel.org
DescriptionCharacter device file /dev/gpiochip*는 GPIO chip과 userspace 사이의 interface입니다.
ABI definition[include/uapi]<linux/gpio.h>
DocumentationDocumentation/userspace-api/gpio/chardev.rst
UsersTBD
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 character-device lifecycle
GPIO chip/dev/gpiochipNopen O_RDWRioctl actionscloseStop and free I/O contexts
ABI contractinclude/uapi/linux/gpio.huserspace-api/gpio/chardev.rst

GPIO chip file descriptor를 열고 ioctl로 line operation을 수행한 뒤 close가 관련 I/O context를 정리한다.