configfs-based GPIO simulator for v5.16
Linus,
A while ago I sent you a pull-request for the GPIO subsystem which, in addition to regular GPIO updates, contained a new GPIO simulator module based on configfs that we want to use to test the uAPI and its main user-space user - libgpiod. The PR included changes to configfs itself in the form of an implementation of the concept of committable items. The changes had been in development for several months and the maintainers had been largely unresponsive which made me send it directly to you eventually after gathering some reviews on the linux-gpio mailing list. You then Cc'ed Al who raised some concerns and the patches were pulled out.
A couple months have passed with a few more iterations and I still can't get any meaningful reviews from the configfs maintainers (nor NAKs for that matter). I decided to give it another try and send it to you directly again.
Since last time I've addressed issues raised by Al (to the best of my ability anyway) and made sure all references are counted correctly (including error paths) and all resources freed. This code has been tested a lot with a development version of libgpiod. The branch I've tagged spent some time in next too with a single issue reported and fixed.
Please consider pulling.
Best Regards,
Bartosz Golaszewski
The following changes since commit 519d81956ee277b4419c723adfb154603c2565ba:
Linux 5.15-rc6 (2021-10-17 20:00:13 -1000)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git tags/gpio-sim-for-v5.16
for you to fetch changes up to 5065e08e4ef3c3fd0daf141f601de4b4d1af2333:
gpio: sim: fix missing unlock on error in gpio_sim_config_commit_item() (2021-10-30 17:10:47 +0200)
----------------------------------------------------------------
gpio simulator + configfs changes for v5.16
- implement committable items in configfs
- add sample code
- implement the GPIO simulator based on configfs committable items
- add tests
----------------------------------------------------------------
Bartosz Golaszewski (8):
configfs: increase the item name length
configfs: use (1UL << bit) for internal flags
configfs: implement committable items
samples: configfs: add a committable group
gpio: sim: new testing module
selftests: gpio: provide a helper for reading chip info
selftests: gpio: add a helper for reading GPIO line names
selftests: gpio: add test cases for gpio-sim
Wei Yongjun (1):
gpio: sim: fix missing unlock on error in gpio_sim_config_commit_item()
Documentation/admin-guide/gpio/gpio-sim.rst | 72 +++ Documentation/filesystems/configfs.rst | 6 +- drivers/gpio/Kconfig | 8 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-sim.c | 884 ++++++++++++++++++++++++++ fs/configfs/configfs_internal.h | 22 +- fs/configfs/dir.c | 276 +++++++- include/linux/configfs.h | 3 +- samples/configfs/configfs_sample.c | 153 +++++ tools/testing/selftests/gpio/.gitignore | 2 + tools/testing/selftests/gpio/Makefile | 4 +- tools/testing/selftests/gpio/config | 1 + tools/testing/selftests/gpio/gpio-chip-info.c | 57 ++ tools/testing/selftests/gpio/gpio-line-name.c | 55 ++ tools/testing/selftests/gpio/gpio-sim.sh | 229 +++++++ 15 files changed, 1750 insertions(+), 23 deletions(-) create mode 100644 Documentation/admin-guide/gpio/gpio-sim.rst create mode 100644 drivers/gpio/gpio-sim.c create mode 100644 tools/testing/selftests/gpio/gpio-chip-info.c create mode 100644 tools/testing/selftests/gpio/gpio-line-name.c create mode 100755 tools/testing/selftests/gpio/gpio-sim.sh
Linus Walleij
Acked-byQuoted 3 lines · Bartosz Golaszewski
A couple months have passed with a few more iterations and I still can't get any meaningful reviews from the configfs maintainers (nor NAKs for that matter). I decided to give it another try and send it to you directly again.
I think this indicates that configfs is partly orphaned. If not formally then practically. Let's poke Greg and see what he says, configfs is important for USB.
I do understand the lack of maintainership hours and that people have more important things to do, we all suffer from this.
If you are the only one who really care maybe we should consider listing you as configfs (co-)maintainer as well?
This pull request FWIW:
Yours,
Linus Walleij
Quoted 10 lines · Linus Walleij
Quoted 3 lines · Bartosz Golaszewski
A couple months have passed with a few more iterations and I still can't get any meaningful reviews from the configfs maintainers (nor NAKs for that matter). I decided to give it another try and send it to you directly again.
I think this indicates that configfs is partly orphaned. If not formally then practically. Let's poke Greg and see what he says, configfs is important for USB.
Quoted 5 lines
I do understand the lack of maintainership hours and that people have more important things to do, we all suffer from this.
If you are the only one who really care maybe we should consider listing you as configfs (co-)maintainer as well?
configfs has two current maintainers, I don't think we need another one, but they should have at least responded to the patch series previously :(
greg k-h
Quoted 2 lines · Greg KH
configfs has two current maintainers, I don't think we need another one, but they should have at least responded to the patch series previously
I've clearly stated that I'm not going to take these "interesting" new atomic semantics without an ACK from Al. And to be honest even with that feature creep isn't exactly on my wish list.
Quoted 8 lines · Christoph Hellwig
Quoted 2 lines · Greg KH
configfs has two current maintainers, I don't think we need another one, but they should have at least responded to the patch series previously
I've clearly stated that I'm not going to take these "interesting" new atomic semantics without an ACK from Al. And to be honest even with that feature creep isn't exactly on my wish list.
I've just went through my inbox to make sure I didn't miss anything but, barring some undelivered email, the only thing you ever stated wrt this series (other than your general dislike of the BIT() macro) is this: https://lkml.org/lkml/2021/1/27/202 four versions ago.
It's Linus Torvalds who stated he'll need an Ack from Al and I have Cc'ed him on multiple iterations over the course of several weeks after that. I assume he's got more important things on his plate but there's not much more I can do...
Feature creep is an exaggeration IMO for something that the very maintainer of configfs (Joel Becker) defined in detail in the documentation a long time ago. Most likely the need for committable items was clear from the start but as there were no users, no implementation ever followed. Now we've presented a very clear use-case hence the proposed implementation of the concept designed by Joel.
Bart
Quoted 3 lines · Linus Walleij
I think this indicates that configfs is partly orphaned. If not formally then practically. Let's poke Greg and see what he says, configfs is important for USB.
I don't think so. It is regularly maintained as you could easily see in the log.
Quoted 23 lines · Bartosz Golaszewski
Linus,
A while ago I sent you a pull-request for the GPIO subsystem which, in addition to regular GPIO updates, contained a new GPIO simulator module based on configfs that we want to use to test the uAPI and its main user-space user - libgpiod. The PR included changes to configfs itself in the form of an implementation of the concept of committable items. The changes had been in development for several months and the maintainers had been largely unresponsive which made me send it directly to you eventually after gathering some reviews on the linux-gpio mailing list. You then Cc'ed Al who raised some concerns and the patches were pulled out.
A couple months have passed with a few more iterations and I still can't get any meaningful reviews from the configfs maintainers (nor NAKs for that matter). I decided to give it another try and send it to you directly again.
Since last time I've addressed issues raised by Al (to the best of my ability anyway) and made sure all references are counted correctly (including error paths) and all resources freed. This code has been tested a lot with a development version of libgpiod. The branch I've tagged spent some time in next too with a single issue reported and fixed.
Quoted 5 lines
Please consider pulling.
Best Regards,
Bartosz Golaszewski
Hi Linus,
The merge window is closing soon, so I'd like to send out a gentle ping and ask you if you have any comments on these patches and what should my next steps be regarding them.
Best Regards,
Bartosz Golaszewski