• L
    spi: atmel: Convert to use CS GPIO descriptors · f52cc52c
    Linus Walleij 提交于
    commit efc92fbb876014c8efa4d90f4ac4b49569f0a84e upstream
    
    This converts the Atmel SPI master driver to use GPIO descriptors
    for chip select handling.
    
    The Atmel driver has duplicate code to look up and initialize CS
    GPIOs from the device tree, so this is removed. It further has code
    to retrieve a CS GPIO from .controller_data but this seems to be
    completely unused in the kernel (legacy codepath?) so I deleted
    this support. It keeps track of polarity when switching the CS, but
    this is not needed anymore since we moved this over to the gpiolib.
    
    The local handling of the "npcs_pin" (I guess this might mean
    "negative polarity chip select pin") is preserved, but I strongly
    suspect this can be switched over to handling by the core and
    using the SPI_MASTER_GPIO_SS flag on the master to assure that
    the additional CS handling in the driver is also done.
    
    Cc: Eugen Hristev <eugen.hristev@microchip.com>
    Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
    Cc: Radu Pirea <radu.pirea@microchip.com>
    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>
    f52cc52c
spi-atmel.c 45.9 KB