• Clark Wang's avatar
    spi: lpspi: Add slave mode support · bcd87317
    Clark Wang authored
    Add slave mode support to the fsl-lpspi driver, only in PIO mode.
    
    For now, there are some limitations for slave mode transmission:
    1. The stale data in RXFIFO will be dropped when the Slave does any new
       transfer.
    2. One transfer can be finished only after all transfer->len data been
       transferred to master device
    3. Slave device only accepts transfer->len data. Any data longer than
       this from master device will be dropped. Any data shorter than this
       from master will cause LPSPI to stuck due to mentioned limitation 2.
    4. Only PIO transfer is supported in Slave Mode.
    
    Wire connection:
    GND, SCK, MISO(to MISO of slave), MOSI(to MOSI of slave), SCS
    Signed-off-by: default avatarClark Wang <xiaoning.wang@nxp.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    bcd87317
spi-fsl-lpspi.c 13.5 KB