mirror of
https://github.com/torvalds/linux.git
synced 2026-02-04 15:28:49 +08:00
wilc1000: use correct write command sequence in wilc_spi_sync_ext()
Instead of using double read for the same register, use the write register command after the read command. The correct sequence is to use the read value in write command instead of reading the same register again. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-11-ajay.kathat@microchip.com
This commit is contained in:
@@ -1167,7 +1167,7 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
|
||||
for (i = 0; (i < 3) && (nint > 0); i++, nint--)
|
||||
reg |= BIT(i);
|
||||
|
||||
ret = wilc_spi_read_reg(wilc, WILC_INTR2_ENABLE, ®);
|
||||
ret = wilc_spi_write_reg(wilc, WILC_INTR2_ENABLE, reg);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "Failed write reg (%08x)...\n",
|
||||
WILC_INTR2_ENABLE);
|
||||
|
||||
Reference in New Issue
Block a user