ACK: [SRU][P/O/N][PATCH v2 0/3] Introduce configfs-based interface for gpio-aggregator (LP: #2103496)

Jacob Martin jacob.martin at canonical.com
Tue Apr 15 22:00:58 UTC 2025


On 4/15/25 1:13 AM, Koichiro Den wrote:
> BugLink: https://bugs.launchpad.net/bugs/2103496
> 
> [ 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 ]
> 
> For Plucky, I cherry-picked the v6 patch series [1] to include it in the
> Release before the main patch series reached linux-next. See the APPLIED
> announcement [2]. As a result, the code differs slightly from the v7 patch
> series [3], which later made it to linux-next and was used for backporting
> to Oracular/Noble as explained below. However, since there are no
> substantial differences between v6 and v7, I do not intend to modify Plucky
> to match v7.
> 
> For Plucky, apply 18 patches in total:
> 
>    * Already applied 12 patches below via [2].
>      -  Applied [PATCH 1/3] to [PATCH 3/3] from [4], which had landed in
>         linux-next.
>      -  Applied [PATCH 2/9] to [PATCH 9/9] from [1], which had been under
>         review.
>      -  Added a "UBUNTU: [Config]" commit for the new config option
>         CONFIG_DEV_SYNC_PROBE.
>      Note:
>      * [4] is a preparatory patch series for [1].
>      * [PATCH 1/9] from [1] was already picked and landed in mainline.
> 
>    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next (brgl/linux.git)
>      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group()")
>      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() checking")
>      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in gpio_aggregator_parse()")
>      05b43de95add ("gpio: aggregator: Fix error code in gpio_aggregator_activate()")
>      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
>      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation")
> 
> For Oracular, apply 19 patches in total:
> 
>    * Cherry-pick 3 commits from mainline, as prerequisite for the main patch series:
>      eb5ab6ffb4ca ("gpio: introduce utilities for synchronous fake device creation")
>      22dec5aa596e ("gpio: aggregator: simplify aggr_parse() with scoped bitmap")
>      12f65d120350 ("gpio: aggregator: protect driver attr handlers against module unload")
>    * Cherry-pick 9 commits from linux-next:
>      7a56efeabffd ("gpio: aggregator: reorder functions to prepare for configfs introduction")
>      7616dd97ae22 ("gpio: aggregator: unify function naming")
>      88fe1d1a646b ("gpio: aggregator: add gpio_aggregator_{alloc,free}()")
>      86f162e73d2d ("gpio: aggregator: introduce basic configfs interface")
>      4ec2315d7fab ("gpio: aggregator: rename 'name' to 'key' in gpio_aggregator_parse()")
>      83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs")
>      0269c768de1b ("gpio: aggregator: cancel deferred probe for devices created via configfs")
>      10f94d092bba ("Documentation: gpio: document configfs interface for gpio-aggregator")
>      6d7f0c1103ef ("selftests: gpio: add test cases for gpio-aggregator")
>    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next (brgl/linux.git)
>      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group()")
>      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() checking")
>      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in gpio_aggregator_parse()")
>      05b43de95add ("gpio: aggregator: Fix error code in gpio_aggregator_activate()")
>      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
>      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation")
>    * Add a "UBUNTU: [Config]" commit for the new config option CONFIG_DEV_SYNC_PROBE.
> 
> For Noble, apply 20 patches in total:
> 
>    * Cherry-pick 4 commits from mainline, as prerequisite for the main patch series:
>      eb5ab6ffb4ca ("gpio: introduce utilities for synchronous fake device creation")
>      d12a82848eac ("bitmap: Define a cleanup function for bitmaps")
>      22dec5aa596e ("gpio: aggregator: simplify aggr_parse() with scoped bitmap")
>      12f65d120350 ("gpio: aggregator: protect driver attr handlers against module unload")
>    * Cherry-pick 9 commits from linux-next:
>      7a56efeabffd ("gpio: aggregator: reorder functions to prepare for configfs introduction")
>      7616dd97ae22 ("gpio: aggregator: unify function naming")
>      88fe1d1a646b ("gpio: aggregator: add gpio_aggregator_{alloc,free}()")
>      86f162e73d2d ("gpio: aggregator: introduce basic configfs interface")
>      4ec2315d7fab ("gpio: aggregator: rename 'name' to 'key' in gpio_aggregator_parse()")
>      83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs")
>      0269c768de1b ("gpio: aggregator: cancel deferred probe for devices created via configfs")
>      10f94d092bba ("Documentation: gpio: document configfs interface for gpio-aggregator")
>      6d7f0c1103ef ("selftests: gpio: add test cases for gpio-aggregator")
>    * Cherry-pick 6 commits (follow-up fixes) from gpio/for-next (brgl/linux.git)
>      eebfcb98cdc0 ("gpio: aggregator: fix "_sysfs" prefix check in gpio_aggregator_make_group()")
>      2e8636ca3400 ("gpio: aggregator: Fix gpio_aggregator_line_alloc() checking")
>      db1baf69e563 ("gpio: aggregator: Return an error if there are no GPIOs in gpio_aggregator_parse()")
>      05b43de95add ("gpio: aggregator: Fix error code in gpio_aggregator_activate()")
>      d945ff52642d ("gpio: aggregator: Fix leak in gpio_aggregator_parse()")
>      290ffcfe3042 ("selftests: gpio: gpio-aggregator: add a test case for _sysfs prefix reservation")
>    * Add a "UBUNTU: [Config]" commit for the new config option CONFIG_DEV_SYNC_PROBE.
> 
> [1] https://lore.kernel.org/all/20250315164123.1855142-1-koichiro.den@canonical.com/
> [2] https://lists.ubuntu.com/archives/kernel-team/2025-March/158315.html
> [3] https://lore.kernel.org/all/20250407043019.4105613-1-koichiro.den@canonical.com/
> [4] https://lore.kernel.org/all/20250221133501.2203897-1-koichiro.den@canonical.com/
> [5] https://lore.kernel.org/all/cover.1744452787.git.dan.carpenter@linaro.org/
> 
> [ 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.
> 
> [ Other Info ]
> 
> v1->v2 changes:
>    - Omitted backports for Jammy. See the comment:
>      https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2103496/comments/4
>    - Included the follow-up fixes from brgl/linux.git gpio/for-next branch:
>      https://lore.kernel.org/all/cover.1744452787.git.dan.carpenter@linaro.org/
>      That's why this v2 submission includes Plucky as its target.
>      Note that it has not landed into linux-next as of this writing.
>    - Fixed messed-up git commit trailers for:
>      * [SRU][O][PATCH 01/13]
>      * [SRU][O][PATCH 04/13]
>      * [SRU][N][PATCH 01/14]
>     (* [SRU][J][PATCH 01/12]) # v2 does not include backport for Jammy
>     (* [SRU][J][PATCH 04/12]) # v2 does not include backport for Jammy
>     (* [SRU][J][PATCH 09/12]) # v2 does not include backport for Jammy
> 

Acked-by: Jacob Martin <jacob.martin at canonical.com>




More information about the kernel-team mailing list