Patch Set 1: Code-Review+2

I'd have a `const bool wp_enable` to see how this toggles the write-protect state:

 /* Write-protect is active low */
const bool wp_enable = false;

realtek_mst_i2c_spi_toggle_gpio_88_strap(fd, !wp_enabled);

/* do stuff */
 realtek_mst_i2c_spi_toggle_gpio_88_strap(fd, wp_enabled);

But then again, it's not really a big deal.

I think we should collectively move Flashrom away from having so many singleton states in each spi master and not more. The above feels influenced by Haskell do-notation, did you happen to program in Haskell? :)

Patch set 1:Code-Review +2

View Change

To view, visit change 46448. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I1407714e1bb4cf2472090bae8a613c7103a5938c
Gerrit-Change-Number: 46448
Gerrit-PatchSet: 1
Gerrit-Owner: Shiyu Sun <sshiyu@google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Comment-Date: Thu, 15 Oct 2020 12:35:16 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment