• Lars-Peter Clausen's avatar
    spi: cadence: Configure SPI clock in the prepare_message() callback · b48b9488
    Lars-Peter Clausen authored
    Currently the cadence SPI driver does the SPI clock configuration (setup CPOL
    and CPHA) in the prepare_transfer_hardware() callback. The
    prepare_transfer_hardware() callback is only called though when the controller
    transitions from a idle state to a non-idle state. Such a transitions happens
    when the message queue goes from empty to non-empty. If multiple messages from
    different SPI slaves with different clock settings are in the message queue the
    clock settings will not be properly updated when switching from one slave device
    to another. Instead do the updating of the clock configuration in the
    prepare_message() callback which will be called for each individual message.
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@linaro.org>
    b48b9488
spi-cadence.c 20.1 KB