80 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3.. _gpio_errors:4 5*******************6GPIO Error Codes7*******************8 9.. _gpio-errors:10 11.. tabularcolumns:: |p{2.5cm}|p{15.0cm}|12 13.. flat-table:: Common GPIO error codes14 :header-rows: 015 :stub-columns: 016 :widths: 1 1617 18 - - ``EAGAIN`` (aka ``EWOULDBLOCK``)19 20 - The device was opened in non-blocking mode and a read can't21 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. Typically30 returned when an ioctl attempts something that would require the31 usage of a resource that was already allocated. The ioctl must not32 be retried without performing another action to fix the problem33 first.34 35 - - ``EFAULT``36 37 - There was a failure while copying data from/to userspace, probably38 caused by an invalid pointer reference.39 40 - - ``EINVAL``41 42 - One or more of the ioctl parameters are invalid or out of the43 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 attempt56 to perform an action incompatible with the current line57 configuration.58 59 - - ``EIO``60 61 - I/O error. Typically returned when there are problems communicating62 with a hardware device or requesting features that hardware does not63 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 was69 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 otherwise76 assume that the device is in a bad state.77 78 #. Request-specific error codes are listed in the individual79 requests descriptions.80