Attention is currently required from: Thomas Heijligen, Angel Pons, Steve Markgraf.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/71801 )
Change subject: programmer: Add bitbanging programmer driver for Linux libgpiod ......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1: Sorry I missed in the first go: I think this new programmer needs to be mentioned in the man page.
File linux_gpiod.c:
https://review.coreboot.org/c/flashrom/+/71801/comment/e2e51c67_e3a73c5e PS1, Line 148: if (data) { : if (gpiod_line_bulk_num_lines(&data->bulk) > 0) : gpiod_line_release_bulk(&data->bulk); : : free(data); : } : : if (chip) : gpiod_chip_close(chip);
At some point we decided to register the shutdown function early so that it does the cleanup in case […]
Registering shutdown function early was in the old times :) During 2020, shutdown functions were moved as late as possible, and then eventually hidden under register master API. Almost all of the programmers now are migrated to the new API. If you look at linux_spi for example, it does not do register shutdown anymore. Now programmers only need to add `.shutdown = linux_spi_shutdown,` into spi_master struct and that's it.
However, bitbang family of programmers (which this new one belongs to) has one more layer of abstraction, so it needs to be migrated separately. Which hopefully will happen sooner or later!
TLDR: register shutdown as late as possible, just before registering master. This part is correct in this patch.
My initial 2 questions are still valid.