Attention is currently required from: Nico Huber, Thomas Heijligen, Edward O'Callaghan, Angel Pons. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/55932 )
Change subject: [RFC] spi_master: Add shutdown function in spi_master struct ......................................................................
Patch Set 2:
(4 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/55932/comment/1744ba4e_7fb50a4d PS1, Line 14: adding another argument to register_spi_master.
The new version seems better! If the shutdown function can be […]
I am so happy to hear this!
Patchset:
PS1:
I wasn't sure which one of the structs is the right place for the shutdown function, and even more […]
thank you, this is actually very useful! (as usual!)
If master is a right place, than the whole change can be done in 3 chunks spi/par/opaque (like we did with the data). Then moving data and shutdown into registered_master can be next step? But that would be internal to the core, callers won't even notice (or shouldn't notice to be precise).
Only in the same file for the "few" masters that you have been looking at
so far ;) I had commit 4f5169df5ff2b63a40d654ab133b8a3108b6a599 in mind when I said "in the same file", looks like lots of masters, but maybe I misunderstand something?
File linux_spi.c:
https://review.coreboot.org/c/flashrom/+/55932/comment/57cd61d5_24cfa2c0 PS1, Line 243: if (register_spi_master(&spi_master_linux, spi_data)) : return 1; /* core does cleanup */ : return 0; :
Or just […]
Done
File programmer.h:
https://review.coreboot.org/c/flashrom/+/55932/comment/097e9372_b256c172 PS1, Line 359: shutdown
I think we'll need shutdown functions for both eventually. Starting with […]
for this to be ideally called `deinit` and logically one level up in `struct programmer_entry`
There is no data one level up, but shutdown function needs data. I started thinking about programmer_entry, but then returned back to master struct, because it has data. Maybe deinit is a different thing to what is currently called "shutdown function"?