← Documents Documentation/userspace-api/gpio/gpio-get-lineinfo-unwatch-ioctl.rst GitHub 원문 ↗

Linux 6.18.37 · Userspace API

GPIO_GET_LINEINFO_UNWATCH_IOCTL

GPIO line 정보 변경 감시를 해제하는 ioctl의 인자, 상태 오류와 반환 규약을 설명합니다.

Source pathDocumentation/userspace-api/gpio/gpio-get-lineinfo-unwatch-ioctl.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약·해설

gpio-get-lineinfo-unwatch-ioctl.rst:1-49

GPIO line 정보 변경 감시를 해제하는 ioctl의 인자, 상태 오류와 반환 규약을 설명합니다.

원문의 ioctl prototype, struct, flag, errno, source path와 줄 좌표를 보존해 전문 번역했습니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. _GPIO_GET_LINEINFO_UNWATCH_IOCTL:
4
5 *******************************
6 GPIO_GET_LINEINFO_UNWATCH_IOCTL
7 *******************************
8
9 Name
10 ====
11
12 GPIO_GET_LINEINFO_UNWATCH_IOCTL - Disable watching a line for changes to its
13 requested state and configuration information.
14
15 Synopsis
16 ========
17
18 .. c:macro:: GPIO_GET_LINEINFO_UNWATCH_IOCTL
19
20 ``int ioctl(int chip_fd, GPIO_GET_LINEINFO_UNWATCH_IOCTL, u32 *offset)``
21
22 Arguments
23 =========
24
25 ``chip_fd``
26 The file descriptor of the GPIO character device returned by `open()`.
27
28 ``offset``
29 The offset of the line to no longer watch.
30
31 Description
32 ===========
33
34 Remove the line from the list of lines being watched on this ``chip_fd``.
35
36 This is the reverse of gpio-v2-get-lineinfo-watch-ioctl.rst (v2) and
37 gpio-get-lineinfo-watch-ioctl.rst (v1).
38
39 Unwatching a line that is not watched is an error (**EBUSY**).
40
41 First added in 5.7.
42
43 Return Value
44 ============
45
46 On success 0.
47
48 On error -1 and the ``errno`` variable is set appropriately.
49 Common error codes are described in error-codes.rst.
50

3. 한국어 전문 번역

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

이름과 호출 형식

1-30

`GPIO_GET_LINEINFO_UNWATCH_IOCTL`은 요청 상태와 configuration 정보 변경을 감시하던 line의 감시를 해제합니다.

호출 형식은 `int ioctl(int chip_fd, GPIO_GET_LINEINFO_UNWATCH_IOCTL, u32 *offset)`입니다. `chip_fd`는 GPIO character device를 `open()`해 얻고, `offset` pointer는 더 이상 감시하지 않을 line의 offset을 가리킵니다.

Line info unwatch 인자
항목설명
chip_fdGPIO character device file descriptor
offset감시를 해제할 line offset을 담은 u32 pointer

감시를 설정한 chip descriptor와 line offset을 전달합니다.

.. SPDX-License-Identifier: GPL-2.0

.. _GPIO_GET_LINEINFO_UNWATCH_IOCTL:

*******************************
GPIO_GET_LINEINFO_UNWATCH_IOCTL
*******************************

Name
====

GPIO_GET_LINEINFO_UNWATCH_IOCTL - Disable watching a line for changes to its
requested state and configuration information.

Synopsis
========

.. c:macro:: GPIO_GET_LINEINFO_UNWATCH_IOCTL

``int ioctl(int chip_fd, GPIO_GET_LINEINFO_UNWATCH_IOCTL, u32 *offset)``

Arguments
=========

``chip_fd``
    The file descriptor of the GPIO character device returned by `open()`.

``offset``
    The offset of the line to no longer watch.

감시 해제 동작

31-42

호출은 지정한 `chip_fd`에서 감시 중인 line 목록으로부터 해당 line을 제거합니다. v2의 `gpio-v2-get-lineinfo-watch-ioctl.rst`와 v1의 `gpio-get-lineinfo-watch-ioctl.rst`가 설정한 감시를 되돌리는 연산입니다.

감시 중이 아닌 line을 unwatch하면 `EBUSY`입니다. 이 ioctl은 Linux 5.7에서 처음 추가되었습니다.

Line info 감시 해제
Watch ioctl로 line 등록chip_fd의 변경 event 읽기offset을 지정해 UNWATCH ioctl 호출감시 목록에서 line 제거미등록 line이면 EBUSY

Watch와 unwatch는 같은 chip_fd의 감시 목록을 갱신합니다.

Description
===========

Remove the line from the list of lines being watched on this ``chip_fd``.

This is the reverse of gpio-v2-get-lineinfo-watch-ioctl.rst (v2) and
gpio-get-lineinfo-watch-ioctl.rst (v1).

Unwatching a line that is not watched is an error (**EBUSY**).

First added in 5.7.

반환값

43-49

성공하면 0을 반환합니다. 실패하면 -1을 반환하고 `errno`를 알맞게 설정합니다. 공통 오류 코드는 `error-codes.rst`에 설명되어 있습니다.

Return Value
============

On success 0.

On error -1 and the ``errno`` variable is set appropriately.
Common error codes are described in error-codes.rst.