55 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3.. _GPIO_GET_LINEINFO_IOCTL:4 5***********************6GPIO_GET_LINEINFO_IOCTL7***********************8 9.. warning::10 This ioctl is part of chardev_v1.rst and is obsoleted by11 gpio-v2-get-lineinfo-ioctl.rst.12 13Name14====15 16GPIO_GET_LINEINFO_IOCTL - Get the publicly available information for a line.17 18Synopsis19========20 21.. c:macro:: GPIO_GET_LINEINFO_IOCTL22 23``int ioctl(int chip_fd, GPIO_GET_LINEINFO_IOCTL, struct gpioline_info *info)``24 25Arguments26=========27 28``chip_fd``29 The file descriptor of the GPIO character device returned by `open()`.30 31``info``32 The :c:type:`line_info<gpioline_info>` to be populated, with the33 ``offset`` field set to indicate the line to be collected.34 35Description36===========37 38Get the publicly available information for a line.39 40This information is available independent of whether the line is in use.41 42.. note::43 The line info does not include the line value.44 45 The line must be requested using gpio-get-linehandle-ioctl.rst or46 gpio-get-lineevent-ioctl.rst to access its value.47 48Return Value49============50 51On success 0 and ``info`` is populated with the chip info.52 53On error -1 and the ``errno`` variable is set appropriately.54Common error codes are described in error-codes.rst.55