• Rafał Miłecki's avatar
    spi: bcm53xx: simplify reading SPI data · 3a410927
    Rafał Miłecki authored
    This commit makes transfer function use spi_transfer_is_last to
    determine if currently processed transfer is the last one. Thanks to
    that we finally set hardware registers properly and it makes controller
    behave the way it's expected to.
    
    This allows simplifying read function which can now simply start reading
    from the slot 0 instead of the last saved offset. It has been
    successfully tested using spi_write_then_read.
    
    Moreover this change fixes handling messages with two writing transfers.
    It's important for SPI flash devices as their drivers commonly use one
    transfer for a command and another one for data.
    Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    3a410927
spi-bcm53xx.c 8.57 KB