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 이름, 코드 심벌, 소스 경로는 원문 표기를 유지합니다.

1. 요약·해설

원문의 핵심 내용을 정리하고 커널 프로그래밍에 필요한 설명을 덧붙였습니다. 아래의 전체 번역과는 별도로 작성한 해설입니다.

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
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. 한국어 전문 번역

영어 원문의 문단 순서와 의미에 맞춰 전체 내용을 번역했습니다. 코드, 함수명, 코드 심벌, URL은 원문 표기를 유지합니다.

/dev/gpiochip file-operation ABI

1-28
항목내용
What/dev/gpiochip[0-9]+
Date2015년 11월
KernelVersion4.4
Contact[email protected]
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를 정리한다.