Attention is currently required from: Nico Huber, Miklós Márton, Angel Pons, Anastasia Klimchuk. Miklós Márton has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54190 )
Change subject: stlinkv3_spi.c: Clean up properly on all init error paths ......................................................................
Patch Set 2: Code-Review+2
(2 comments)
Patchset:
PS2: LGTM and thanks for the cleanup!
File stlinkv3_spi.c:
https://review.coreboot.org/c/flashrom/+/54190/comment/a207fe85_b9f64707 PS1, Line 443: stlinkv3_command(command, sizeof(command), answer, sizeof(answer), "STLINK_BRIDGE_CLOSE");
Oh yes, there is a STLINK_BRIDGE_INIT_SPI in stlinkv3_spi_open(), maybe it is? […]
Hello Anastasia,
First of all: many thanks for cleaning out my crappy code!
Yes the STLINK_BRIDGE_CLOSE is complementary to the STLINK_BRIDGE_INIT_SPI.
Tldr: there are multiple bridge subsystems (I2C, CAN, GPIO) on the device and they could be closed with the STLINK_BRIDGE_CLOSE command with bridge subsystem specified by the command[2] "argument". However opening is done with separate commands (STLINK_BRIDGE_INIT_SPI/CAN/GPIO).