summaryrefslogtreecommitdiffstats
path: root/Documentation/userspace-api/gpio/gpio-get-lineinfo-unwatch-ioctl.rst
blob: a82d0161daf871cb52a30b7c86ee890323c6eb07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.. 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.

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.

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

On success 0.

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