spi: Pass master instead of flash to .send_command
In the SPI-master API, `.send_command` should only forward commands to
the SPI bus. All details about the commands and the SPI slave should be
handled in the chip driver. Hence, replace the `flashctx` pointer with
one to the `spi_master` to enforce proper separation.
Change-Id: I50934a1294217794b7e23cc98ade7e4279c059a1
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/74897
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/it87spi.c b/it87spi.c
index 70b1a8f..127270a 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -100,7 +100,7 @@
return;
}
-static int it8716f_spi_send_command(const struct flashctx *flash,
+static int it8716f_spi_send_command(const struct spi_master *,
unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr,
unsigned char *readarr);
@@ -274,7 +274,7 @@
* commands with the address in inverse wire order. That's why the register
* ordering in case 4 and 5 may seem strange.
*/
-static int it8716f_spi_send_command(const struct flashctx *flash,
+static int it8716f_spi_send_command(const struct spi_master *mst,
unsigned int writecnt, unsigned int readcnt,
const unsigned char *writearr,
unsigned char *readarr)