• Peter Shih's avatar
    spi: mediatek: Don't modify spi_transfer when transfer. · 00bca73b
    Peter Shih authored
    Mediatek SPI driver modifies some fields (tx_buf, rx_buf, len, tx_dma,
    rx_dma) of the spi_transfer* passed in when doing transfer_one and in
    interrupt handler. This is somewhat unexpected, and there are some
    caller (e.g. Cr50 spi driver) that reuse the spi_transfer for multiple
    messages. Add a field to record how many bytes have been transferred,
    and calculate the right len / buffer based on it instead.
    Signed-off-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
    
    Change-Id: I23e218cd964f16c0b2b26127d4a5ca6529867673
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    00bca73b
spi-mt65xx.c 22.4 KB