aboutsummaryrefslogtreecommitdiff
path: root/Documentation/admin-guide/gpio
AgeCommit message (Collapse)AuthorFilesLines
2024-07-09gpio: virtuser: new virtual testing driver for the GPIO APIBartosz Golaszewski2-0/+178
The GPIO subsystem used to have a serious problem with undefined behavior and use-after-free bugs on hot-unplug of GPIO chips. This can be considered a corner-case by some as most GPIO controllers are enabled early in the boot process and live until the system goes down but most GPIO drivers do allow unbind over sysfs, many are loadable modules that can be (force) unloaded and there are also GPIO devices that can be dynamically detached, for instance CP2112 which is a USB GPIO expender. Bugs can be triggered both from user-space as well as by in-kernel users. We have the means of testing it from user-space via the character device but the issues manifest themselves differently in the kernel. This is a proposition of adding a new virtual driver - a configurable GPIO consumer that can be configured over configfs (similarly to gpio-sim) or described on the device-tree. This driver is aimed as a helper in spotting any regressions in hot-unplug handling in GPIOLIB. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: move gpio-mockup into obsolete sectionKent Gibson2-1/+1
The gpio-mockup has been obsoleted by the gpio-sim, so relocate its documentation into the obsolete section of the admin-guide book. Signed-off-by: Kent Gibson <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: document gpio-mockup as obsoleted by gpio-simKent Gibson1-0/+8
Update the gpio-mockup documentation to note that is has been obsoleted by the gpio-sim. Signed-off-by: Kent Gibson <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: capitalize GPIO in index titleKent Gibson1-1/+1
Capitalise the title of the GPIO documentation page to match other subsystems. Signed-off-by: Kent Gibson <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: add chardev v1 userspace API documentationKent Gibson1-0/+1
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 <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: move sysfs into an obsolete sectionKent Gibson3-168/+12
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 <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2024-01-22Documentation: gpio: add chardev userspace API documentationKent Gibson1-0/+1
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2023-03-06gpiolib: remove legacy gpio_export()Arnd Bergmann1-1/+1
There are only a handful of users of gpio_export() and related functions. As these are just wrappers around the modern gpiod_export() helper, remove the wrappers and open-code the gpio_to_desc in all callers to shrink the legacy API. Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
2023-02-02Documentation: admin-guide: correct spellingRandy Dunlap1-1/+1
Correct spelling problems for Documentation/admin-guide/ as reported by codespell. Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Mukesh Ojha <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Zefan Li <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: [email protected] Cc: Alasdair Kergon <[email protected]> Cc: Mike Snitzer <[email protected]> Cc: [email protected] Cc: Mauro Carvalho Chehab <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
2022-01-24gpio: sim: add doc file to index fileRandy Dunlap1-0/+1
Include the gpio-sim.rst file in the GPIO index (toc/table of contents). Quietens this doc build warning: Documentation/admin-guide/gpio/gpio-sim.rst: WARNING: document isn't included in any toctree Fixes: b48f6b466e44 ("gpio: sim: new testing module") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2021-12-17gpio: sim: new testing moduleBartosz Golaszewski1-0/+134
Implement a new, modern GPIO testing module controlled by configfs attributes instead of module parameters. The goal of this driver is to provide a replacement for gpio-mockup that will be easily extensible with new features and doesn't require reloading the module to change the setup. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Linus Walleij <[email protected]>
2021-03-26gpio: mockup: Adjust documentation to the codeAndy Shevchenko1-5/+6
First of all one of the parameter missed 'mockup' in its name, Second, the semantics of the integer pairs depends on the sign of the base (the first value in the pair). Update documentation to reflect the real code behaviour. Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup") Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-10-08docs: gpio: add a new document to its index.rstMauro Carvalho Chehab1-0/+1
There's now a new ReST file. Add it to the index.rst file. Fixes: ce7a2f77f976 ("docs: gpio: Add GPIO Aggregator documentation") Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup") Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/bad4d85c218d59c1bf69157df8e1012577680d88.1601616399.git.mchehab+huawei@kernel.org Signed-off-by: Linus Walleij <[email protected]>
2020-09-30Documentation: gpio: add documentation for gpio-mockupBartosz Golaszewski1-0/+50
There's some documentation for gpio-mockup's debugfs interface in the driver's source but it's not much. Add proper documentation for this testing module. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]>
2020-05-18docs: gpio: Add GPIO Aggregator documentationGeert Uytterhoeven2-0/+112
Document the GPIO Aggregator, and the two typical use-cases. Signed-off-by: Geert Uytterhoeven <[email protected]> Tested-by: Eugeniu Rosca <[email protected]> Reviewed-by: Ulrich Hecht <[email protected]> Reviewed-by: Eugeniu Rosca <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
2019-07-15docs: gpio: add sysfs interface to the admin-guideMauro Carvalho Chehab2-0/+184
While this is stated as obsoleted, the sysfs interface described there is still valid, and belongs to the admin-guide. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Linus Walleij <[email protected]>