• L
    spi: ath79: Convert to use CS GPIO descriptors · aa82c81c
    Linus Walleij 提交于
    commit 8db79547e79f6606b6d2d3b2bf6f36ec311195be upstream
    
    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: NLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: NMark Brown <broonie@kernel.org>
    Signed-off-by: NZou Cao <zoucao@linux.alibaba.com>
    Reviewed-by: NBaoyou Xie <xie.baoyou@linux.alibaba.com>
    aa82c81c
spi-ath79.c 7.2 KB