• L
    spi: davinci: Convert to use CS GPIO descriptors · 2b3d9262
    Linus Walleij 提交于
    commit 101a68e74fe089b975c407f1bc9359882b05489a upstream
    
    This converts the DaVinci SPI master driver to use GPIO
    descriptors for chip select handling.
    
    DaVinci parses the device tree a second time for the chip
    select GPIOs (no relying on the parsing already happening
    in the SPI core) and handles inversion semantics locally.
    
    We simply drop the extra parsing and set up and move the
    CS handling to the core and gpiolib. The fact that the
    driver is actively driving the GPIO in the
    davinci_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.
    
    This driver also supports instantiation from board files,
    but these are all using native chip selects so no problem
    with GPIO lines here.
    
    Cc: David Lechner <david@lechnology.com>
    Cc: Bartosz Golaszewski <bgolaszewski@baylibre.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>
    2b3d9262
spi-davinci.c 27.4 KB