[SRU][P][PATCH 00/12] Introduce configfs-based interface for gpio-aggregator
Koichiro Den
koichiro.den at canonical.com
Tue Mar 18 08:49:54 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2103496
SRU Justification
[ Impact ]
The existing 'new_device' interface for gpio-aggregator
(https://docs.kernel.org/admin-guide/gpio/gpio-aggregator.html)
has several limitations:
* No way to determine when GPIO aggregator creation is complete.
* No way to retrieve errors when creating a GPIO aggregator.
* No way to trace a GPIO line of an aggregator back to its corresponding
physical device.
* The 'new_device' echo does not indicate which virtual gpiochip<N> was
created.
* No way to assign names to GPIO lines exported through an aggregator.
While the GPIO aggregator concept is useful for resource isolation, these
limitations currently hinder its practical effectiveness.
This patch series addresses all those issues.
[ Fix ]
Apply 12 patches in total:
* Apply [PATCH 1/3] to [PATCH 3/3] from [1], which have landed in linux-next.
* Add a "UBUNTU: [Config]" commit for the new config option CONFIG_DEV_SYNC_PROBE.
* Apply [PATCH 2/9] to [PATCH 9/9] from [2], which are under review.
[1] https://lore.kernel.org/all/20250221133501.2203897-1-koichiro.den@canonical.com/
[2] https://lore.kernel.org/all/20250315164123.1855142-1-koichiro.den@canonical.com/
Note:
* [1] is a preparatory patch series for [2].
* [PATCH 1/9] from [2] was already picked and landed in mainline.
[ Test Plan ]
Run kselftest.
[ Where problems could occur ]
Any regressions would only impact users who load and use the
gpio-aggregator module, potentially causing issues like memory leaks or
system crashes.
Koichiro Den (12):
gpio: introduce utilities for synchronous fake device creation
gpio: sim: convert to use dev-sync-probe utilities
gpio: virtuser: convert to use dev-sync-probe utilities
UBUNTU: [Config] updateconfigs for DEV_SYNC_PROBE
UBUNTU: SAUCE: gpio: aggregator: reorder functions to prepare for
configfs introduction
UBUNTU: SAUCE: gpio: aggregator: add aggr_alloc()/aggr_free()
UBUNTU: SAUCE: gpio: aggregator: introduce basic configfs interface
UBUNTU: SAUCE: gpio: aggregator: rename 'name' to 'key' in
aggr_parse()
UBUNTU: SAUCE: gpio: aggregator: expose aggregator created via legacy
sysfs to configfs
UBUNTU: SAUCE: gpio: aggregator: cancel deferred probe for devices
created via configfs
UBUNTU: SAUCE: Documentation: gpio: document configfs interface for
gpio-aggregator
UBUNTU: SAUCE: selftests: gpio: add test cases for gpio-aggregator
.../admin-guide/gpio/gpio-aggregator.rst | 107 ++
debian.master/config/annotations | 1 +
drivers/gpio/Kconfig | 7 +
drivers/gpio/Makefile | 3 +
drivers/gpio/dev-sync-probe.c | 97 ++
drivers/gpio/dev-sync-probe.h | 25 +
drivers/gpio/gpio-aggregator.c | 1165 ++++++++++++++---
drivers/gpio/gpio-sim.c | 84 +-
drivers/gpio/gpio-virtuser.c | 73 +-
tools/testing/selftests/gpio/Makefile | 2 +-
tools/testing/selftests/gpio/config | 1 +
.../testing/selftests/gpio/gpio-aggregator.sh | 723 ++++++++++
12 files changed, 1951 insertions(+), 337 deletions(-)
create mode 100644 drivers/gpio/dev-sync-probe.c
create mode 100644 drivers/gpio/dev-sync-probe.h
create mode 100755 tools/testing/selftests/gpio/gpio-aggregator.sh
--
2.45.2
More information about the kernel-team
mailing list