1 .. SPDX-License-Identifier: GPL-2.0
11 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}|
13 .. flat-table:: Common GPIO error codes
18 - - ``EAGAIN`` (aka ``EWOULDBLOCK``)
20 - The device was opened in non-blocking mode and a read can't
21 be performed as there is no data available.
25 - The file descriptor is not valid.
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
37 - There was a failure while copying data from/to userspace, probably
38 caused by an invalid pointer reference.
42 - One or more of the ioctl parameters are invalid or out of the
43 allowed range. This is a widely used error code.
47 - Device not found or was removed.
51 - There's not enough memory to handle the desired operation.
55 - Permission denied. Typically returned in response to an attempt
56 to perform an action incompatible with the current line
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.
68 - Typically returned when a feature requiring interrupt support was
69 requested, but the line does not support interrupts.
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.
78 #. Request-specific error codes are listed in the individual
79 requests descriptions.