• Linus Walleij's avatar
    spi: cadence: Fix default polarity of native chipselect · 6046f540
    Linus Walleij authored
    The Cadence controller also supports platforms specifying
    native chipselects. When I enforce the use of high CS
    for drivers opting in for using GPIO descriptors, I
    inadvertedly switched the driver to also use active
    high chip select for native chip selects.
    
    Fix this by inverting the logic in the callback for the
    native chip select. Rename the parameter from "is_high"
    (which is interpreted as being high when 0, which is
    confusing, I will not make any drug-related jokes here)
    to "enabled" which is more intuitive, especially now that
    it is true when CS is supposed to be enabled.
    
    Cc: Wei Yongjun <weiyongjun1@huawei.com>
    Fixes: cfeefa79 ("spi: cadence: Convert to use CS GPIO descriptors")
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    6046f540
spi-cadence.c 21.1 KB