Age | Commit message (Collapse) | Author | Files | Lines |
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|
|
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]>
|