Skip to content
  • Linus Walleij's avatar
    spi: atmel: Convert to use CS GPIO descriptors · efc92fbb
    Linus Walleij authored and Mark Brown's avatar Mark Brown committed
    
    
    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: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    efc92fbb