gpio-get-chipinfo-ioctl.rst 841 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .. SPDX-License-Identifier: GPL-2.0
  2. .. _GPIO_GET_CHIPINFO_IOCTL:
  3. ***********************
  4. GPIO_GET_CHIPINFO_IOCTL
  5. ***********************
  6. Name
  7. ====
  8. GPIO_GET_CHIPINFO_IOCTL - Get the publicly available information for a chip.
  9. Synopsis
  10. ========
  11. .. c:macro:: GPIO_GET_CHIPINFO_IOCTL
  12. ``int ioctl(int chip_fd, GPIO_GET_CHIPINFO_IOCTL, struct gpiochip_info *info)``
  13. Arguments
  14. =========
  15. ``chip_fd``
  16. The file descriptor of the GPIO character device returned by `open()`.
  17. ``info``
  18. The :c:type:`chip_info<gpiochip_info>` to be populated.
  19. Description
  20. ===========
  21. Gets the publicly available information for a particular GPIO chip.
  22. Return Value
  23. ============
  24. On success 0 and ``info`` is populated with the chip info.
  25. On error -1 and the ``errno`` variable is set appropriately.
  26. Common error codes are described in error-codes.rst.