xref: /linux/Documentation/userspace-api/gpio/gpio-v2-line-set-values-ioctl.rst (revision 32a0a0da530eab78d755474270bf53274b93a1e6)
1*32a0a0daSKent Gibson.. SPDX-License-Identifier: GPL-2.0
2*32a0a0daSKent Gibson
3*32a0a0daSKent Gibson.. _GPIO_V2_LINE_SET_VALUES_IOCTL:
4*32a0a0daSKent Gibson
5*32a0a0daSKent Gibson*****************************
6*32a0a0daSKent GibsonGPIO_V2_LINE_SET_VALUES_IOCTL
7*32a0a0daSKent Gibson*****************************
8*32a0a0daSKent Gibson
9*32a0a0daSKent GibsonName
10*32a0a0daSKent Gibson====
11*32a0a0daSKent Gibson
12*32a0a0daSKent GibsonGPIO_V2_LINE_SET_VALUES_IOCTL - Set the values of requested output lines.
13*32a0a0daSKent Gibson
14*32a0a0daSKent GibsonSynopsis
15*32a0a0daSKent Gibson========
16*32a0a0daSKent Gibson
17*32a0a0daSKent Gibson.. c:macro:: GPIO_V2_LINE_SET_VALUES_IOCTL
18*32a0a0daSKent Gibson
19*32a0a0daSKent Gibson``int ioctl(int req_fd, GPIO_V2_LINE_SET_VALUES_IOCTL, struct gpio_v2_line_values *values)``
20*32a0a0daSKent Gibson
21*32a0a0daSKent GibsonArguments
22*32a0a0daSKent Gibson=========
23*32a0a0daSKent Gibson
24*32a0a0daSKent Gibson``req_fd``
25*32a0a0daSKent Gibson    The file descriptor of the GPIO character device, as returned in the
26*32a0a0daSKent Gibson    :c:type:`request.fd<gpio_v2_line_request>` by gpio-v2-get-line-ioctl.rst.
27*32a0a0daSKent Gibson
28*32a0a0daSKent Gibson``values``
29*32a0a0daSKent Gibson    The :c:type:`line_values<gpio_v2_line_values>` to set with the ``mask`` set
30*32a0a0daSKent Gibson    to indicate the subset of requested lines to set and ``bits`` set to
31*32a0a0daSKent Gibson    indicate the new value.
32*32a0a0daSKent Gibson
33*32a0a0daSKent GibsonDescription
34*32a0a0daSKent Gibson===========
35*32a0a0daSKent Gibson
36*32a0a0daSKent GibsonSet the values of requested output lines.
37*32a0a0daSKent Gibson
38*32a0a0daSKent GibsonOnly the values of output lines may be set.
39*32a0a0daSKent GibsonAttempting to set the value of an input line is an error (**EPERM**).
40*32a0a0daSKent Gibson
41*32a0a0daSKent GibsonReturn Value
42*32a0a0daSKent Gibson============
43*32a0a0daSKent Gibson
44*32a0a0daSKent GibsonOn success 0.
45*32a0a0daSKent Gibson
46*32a0a0daSKent GibsonOn error -1 and the ``errno`` variable is set appropriately.
47*32a0a0daSKent GibsonCommon error codes are described in error-codes.rst.
48