Skip to content
  • Linus Walleij's avatar
    spi: create a message queueing infrastructure · ffbbdd21
    Linus Walleij authored
    
    
    This rips the message queue in the PL022 driver out and pushes
    it into (optional) common infrastructure. Drivers that want to
    use the message pumping thread will need to define the new
    per-messags transfer methods and leave the deprecated transfer()
    method as NULL.
    
    Most of the design is described in the documentation changes that
    are included in this patch.
    
    Since there is a queue that need to be stopped when the system
    is suspending/resuming, two new calls are implemented for the
    device drivers to call in their suspend()/resume() functions:
    spi_master_suspend() and spi_master_resume().
    
    ChangeLog v1->v2:
    - Remove Kconfig entry and do not make the queue support optional
      at all, instead be more agressive and have it as part of the
      compulsory infrastructure.
    - If the .transfer() method is implemented, delete print a small
      deprecation notice and do not start the transfer pump.
    - Fix a bitrotted comment.
    ChangeLog v2->v3:
    - Fix up a problematic sequence courtesy of Chris Blair.
    - Stop rather than destroy the queue on suspend() courtesy of
      Chris Blair.
    
    Signed-off-by: default avatarChris Blair <chris.blair@stericsson.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Tested-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Reviewed-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
    Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
    ffbbdd21