summaryrefslogtreecommitdiff
path: root/Documentation/userspace-api/gpio
AgeCommit message (Collapse)Author
2024-07-01Documentation: gpio: Reconfiguration with unset direction (uAPI v2)Kent Gibson
Update description of reconfiguration rules, adding requirement that a direction flag be set to enable changing configuration for a line. Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240626052925.174272-5-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-07-01Documentation: gpio: Reconfiguration with unset direction (uAPI v1)Kent Gibson
Update description of reconfiguration rules, adding requirement that a direction flag be set or the configuration is considered invalid. Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240626052925.174272-4-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-06-12Documentation: gpio: Clarify effect of active low flag on line edgesKent Gibson
The documentation does not make sufficiently clear that edge polarity is based on changes to the logical line values, and that the physical polarity of edges is dependent on the active low flag. Clarify the relationship between the active low flag and edge polarity for the functions that read edge events. Suggested-by: David C. Rankin <drankinatty@gmail.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240610092157.9147-3-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-06-12Documentation: gpio: Clarify effect of active low flag on line valuesKent Gibson
The documentation does not make sufficiently clear that the uAPI deals with logical line values, nor does it describe the influence of the active low flag on the mapping between physical and logical line values. Clarify the relationship between physical and logical line values and the effect of the active low flag for ioctls passing line values. Suggested-by: David C. Rankin <drankinatty@gmail.com> Signed-off-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20240610092157.9147-2-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-06-10docs: gpio: prefer pread(2) for interrupt readingHuichun Feng
In legacy sysfs GPIO, when using poll(2) on the sysfs GPIO value for state change awaiting, a subsequent read(2) is required for consuming the event, which the doc recommends the use of lseek(2) or close-and-reopen to reset the file offset afterwards. The recommendations however, require at least 2 syscalls to consume the event. Gladly, use of pread(2) require only 1 syscall for the consumption. Let's advertise this usage by prioritizing its placement. Signed-off-by: Huichun Feng <foxhoundsk.tw@gmail.com> Link: https://lore.kernel.org/r/20240609173728.2950808-1-foxhoundsk.tw@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-04-02Documentation: gpio: fix typoDavid Lechner
EOPNOTSUPP has two 'P's. Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-02-14Documentation: gpio: clarify sysfs line values are logicalKent Gibson
Clarify that line values are logical, not physical, by replacing high/low terminology with active/inactive. Signed-off-by: Kent Gibson <warthog618@gmail.com> Reviewed-by: Andy Shevchenko <amdy.shevchenko@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-25Documentation: gpio: describe uAPI behaviour for unsupported configKent Gibson
The existing uAPI documentation does not adequately describe how the kernel handles the case where the underlying hardware or driver does not support the requested configuration. Add a Configuration Support section describing that behaviour to both the v1 and v2 documentation, and better document the errors returned where the requested configuration cannot be supported. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-22Documentation: gpio: add chardev v1 userspace API documentationKent Gibson
Add documentation for v1 of the GPIO character device userspace API to the obsolete section of both the admin-guide and userspace-api books. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-22Documentation: gpio: update sysfs documentation to reference new chardev docKent Gibson
Update GPIO sysfs interface documentation to reference the new chardev document rather than gpio.h. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-22Documentation: gpio: move sysfs into an obsolete sectionKent Gibson
The GPIO sysfs API is long obsolete, so highlight this even further by moving it into an obsolete APIs section in both the admin-guide and userspace-api books. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-01-22Documentation: gpio: add chardev userspace API documentationKent Gibson
Add documentation for the GPIO character device userspace API. Added to the userspace-api book, but also provide a link from the admin-guide book, as historically the GPIO documentation has been there. Signed-off-by: Kent Gibson <warthog618@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>