I'm willing to merge this as is. The automatic voltage adaption
seems a little rough on the edges, though. Generally, such a
feature would belong into a higher level of flashrom. And then
there is the possibility that the user didn't connect the chip
directly to the programmer...
Anyway, this already adds a lot to flashrom's traits. I'll try
to rebase it in Gerrit. If that works and there are no further
comments, I'll try to merge it this weekend.
Patch set 25:Code-Review +2
4 comments:
Patch Set #25, Line 253: if (io_voltage_100mV < usb8452_io_voltages_in_100mV[0]) {
Nit, if called with `use_smaller = false` we might not want to take this path?
Currently, that is not possible with the chips in our database anyway.
Patch Set #25, Line 443: if (device_pid == USB8451) {
Nit, taking this path will result in no warning printed, even if
the user specified a `voltage`, AFAICS? usb8452_spi_set_io_voltage()
should show the warning and return 0, so I guess we just don't need
this `if` around it.
Patch Set #25, Line 504: return -1;
This path is a little troubling. What if the user has a voltage translator
hooked-up? They wouldn't have a way to force operation...
Might look nicer with the whole `if` block in a separate fucntion.
To view, visit change 25683. To unsubscribe, or for help writing mail filters, visit settings.