~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/gpio/error-codes.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 .. SPDX-License-Identifier: GPL-2.0
  2 
  3 .. _gpio_errors:
  4 
  5 *******************
  6 GPIO Error Codes
  7 *******************
  8 
  9 .. _gpio-errors:
 10 
 11 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
 12 
 13 .. flat-table:: Common GPIO error codes
 14     :header-rows:  0
 15     :stub-columns: 0
 16     :widths: 1 16
 17 
 18     -  -  ``EAGAIN`` (aka ``EWOULDBLOCK``)
 19 
 20        -  The device was opened in non-blocking mode and a read can't
 21           be performed as there is no data available.
 22 
 23     -  -  ``EBADF``
 24 
 25        -  The file descriptor is not valid.
 26 
 27     -  -  ``EBUSY``
 28 
 29        -  The ioctl can't be handled because the device is busy. Typically
 30           returned when an ioctl attempts something that would require the
 31           usage of a resource that was already allocated. The ioctl must not
 32           be retried without performing another action to fix the problem
 33           first.
 34 
 35     -  -  ``EFAULT``
 36 
 37        -  There was a failure while copying data from/to userspace, probably
 38           caused by an invalid pointer reference.
 39 
 40     -  -  ``EINVAL``
 41 
 42        -  One or more of the ioctl parameters are invalid or out of the
 43           allowed range. This is a widely used error code.
 44 
 45     -  -  ``ENODEV``
 46 
 47        -  Device not found or was removed.
 48 
 49     -  -  ``ENOMEM``
 50 
 51        -  There's not enough memory to handle the desired operation.
 52 
 53     -  -  ``EPERM``
 54 
 55        -  Permission denied. Typically returned in response to an attempt
 56           to perform an action incompatible with the current line
 57           configuration.
 58 
 59     -  -  ``EIO``
 60 
 61        -  I/O error. Typically returned when there are problems communicating
 62           with a hardware device or requesting features that hardware does not
 63           support. This could indicate broken or flaky hardware.
 64           It's a 'Something is wrong, I give up!' type of error.
 65 
 66     -  - ``ENXIO``
 67 
 68        -  Typically returned when a feature requiring interrupt support was
 69           requested, but the line does not support interrupts.
 70 
 71 .. note::
 72 
 73   #. This list is not exhaustive; ioctls may return other error codes.
 74      Since errors may have side effects such as a driver reset,
 75      applications should abort on unexpected errors, or otherwise
 76      assume that the device is in a bad state.
 77 
 78   #. Request-specific error codes are listed in the individual
 79      requests descriptions.

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php