Skip to content
  • Linus Walleij's avatar
    spi: bcm2835: Convert to use CS GPIO descriptors · 3bd158c5
    Linus Walleij authored and Mark Brown's avatar Mark Brown committed
    
    
    This converts the BCM2835 SPI master driver to use GPIO
    descriptors for chip select handling.
    
    The BCM2835 driver was relying on the core to drive the
    CS high/low so very small changes were needed for this
    part. If it managed to request the CS from the device tree
    node, all is pretty straight forward.
    
    However for native GPIOs this driver has a quite unorthodox
    loopback to request some GPIOs from the SoC GPIO chip by
    looking it up from the device tree using gpiochip_find()
    and then offseting hard into its numberspace. This has
    been augmented a bit by using gpiochip_request_own_desc()
    but this code really needs to be verified. If "native CS"
    is actually an SoC GPIO, why is it even done this way?
    Should this GPIO not just be defined in the device tree
    like any other CS GPIO? I'm confused.
    
    Cc: Lukas Wunner <lukas@wunner.de>
    Cc: Stefan Wahren <stefan.wahren@i2se.com>
    Cc: Martin Sperl <kernel@martin.sperl.org>
    Cc: Chris Boot <bootc@bootc.net>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20190804003852.1312-1-linus.walleij@linaro.org
    
    
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    3bd158c5