Skip to content
  • Linus Walleij's avatar
    spi: ath79: Convert to use CS GPIO descriptors · 8db79547
    Linus Walleij authored and Mark Brown's avatar Mark Brown committed
    
    
    This converts the ATH79 SPI master driver to use GPIO descriptors
    for chip select handling.
    
    The ATH79 driver was requesting the GPIO and driving it from the
    bitbang .chipselect callback. Do not request it anymore as the SPI
    core will request it, remove the line inversion semantics for the
    GPIO case (handled by gpiolib) and let the SPI core deal with
    requesting the GPIO line from the device tree node of the controller.
    
    This driver can be instantiated from a board file (no device tree)
    but the board files only use native CS (no GPIO lines) so we should
    be fine just letting the SPI core grab the GPIO from the device.
    
    The fact that the driver is actively driving the GPIO in the
    ath79_spi_chipselect() callback is confusing since the host does
    not set SPI_MASTER_GPIO_SS so this should not ever get called when
    using GPIO CS. I put in a comment about this.
    
    Cc: Felix Fietkau <nbd@nbd.name>
    Cc: Alban Bedel <albeu@free.fr>
    Cc: Linuxarm <linuxarm@huawei.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    8db79547