xref: /linux/Documentation/userspace-api/gpio/gpio-get-chipinfo-ioctl.rst (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1.. SPDX-License-Identifier: GPL-2.0
2
3.. _GPIO_GET_CHIPINFO_IOCTL:
4
5***********************
6GPIO_GET_CHIPINFO_IOCTL
7***********************
8
9Name
10====
11
12GPIO_GET_CHIPINFO_IOCTL - Get the publicly available information for a chip.
13
14Synopsis
15========
16
17.. c:macro:: GPIO_GET_CHIPINFO_IOCTL
18
19``int ioctl(int chip_fd, GPIO_GET_CHIPINFO_IOCTL, struct gpiochip_info *info)``
20
21Arguments
22=========
23
24``chip_fd``
25    The file descriptor of the GPIO character device returned by `open()`.
26
27``info``
28    The :c:type:`chip_info<gpiochip_info>` to be populated.
29
30Description
31===========
32
33Gets the publicly available information for a particular GPIO chip.
34
35Return Value
36============
37
38On success 0 and ``info`` is populated with the chip info.
39
40On error -1 and the ``errno`` variable is set appropriately.
41Common error codes are described in error-codes.rst.
42