Lines Matching +full:gpio +full:- +full:line
1 .. SPDX-License-Identifier: GPL-2.0
4 GPIO Character Device Userspace API (v1)
20 The API is based around three major objects, the :ref:`gpio-v1-chip`, the
21 :ref:`gpio-v1-line-handle`, and the :ref:`gpio-v1-line-event`.
23 Where "line event" is used in this document it refers to the request that can
24 monitor a line for edge events, not the edge events themselves.
26 .. _gpio-v1-chip:
31 The Chip represents a single GPIO chip and is exposed to userspace using device
34 Each chip supports a number of GPIO lines,
36 ``offset`` in the range from 0 to ``chip.lines - 1``, i.e. `[0,chip.lines)`.
38 Lines are requested from the chip using either gpio-get-linehandle-ioctl.rst
39 and the resulting line handle is used to access the GPIO chip's lines, or
40 gpio-get-lineevent-ioctl.rst and the resulting line event is used to monitor
41 a GPIO line for edge events.
44 on the GPIO device file is referred to as ``chip_fd``.
47 ----------
54 Get Line Handle <gpio-get-linehandle-ioctl>
55 Get Line Event <gpio-get-lineevent-ioctl>
56 Get Chip Info <gpio-get-chipinfo-ioctl>
57 Get Line Info <gpio-get-lineinfo-ioctl>
58 Watch Line Info <gpio-get-lineinfo-watch-ioctl>
59 Unwatch Line Info <gpio-get-lineinfo-unwatch-ioctl>
60 Read Line Info Changed Events <gpio-lineinfo-changed-read>
62 .. _gpio-v1-line-handle:
64 Line Handle
67 Line handles are created by gpio-get-linehandle-ioctl.rst and provide
68 access to a set of requested lines. The line handle is exposed to userspace
70 :c:type:`request.fd<gpiohandle_request>` by gpio-get-linehandle-ioctl.rst.
72 Within this documentation, the line handle file descriptor is referred to
76 ----------
78 The following operations may be performed on the line handle:
83 Get Line Values <gpio-handle-get-line-values-ioctl>
84 Set Line Values <gpio-handle-set-line-values-ioctl>
85 Reconfigure Lines <gpio-handle-set-config-ioctl>
87 .. _gpio-v1-line-event:
89 Line Event
92 Line events are created by gpio-get-lineevent-ioctl.rst and provide
93 access to a requested line. The line event is exposed to userspace
95 :c:type:`request.fd<gpioevent_request>` by gpio-get-lineevent-ioctl.rst.
97 Within this documentation, the line event file descriptor is referred to
101 ----------
103 The following operations may be performed on the line event:
108 Get Line Value <gpio-handle-get-line-values-ioctl>
109 Read Line Edge Events <gpio-lineevent-data-read>
118 .. kernel-doc:: include/uapi/linux/gpio.h
131 error-codes