summaryrefslogtreecommitdiff
path: root/crypto/algapi.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2019-12-04 16:27:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 16:29:55 -0500
commit4d8da4736ca2fff3494e5f5332de7776dd417e82 (patch)
tree71a25c26bcba3a395617804936ed6ae951865a10 /crypto/algapi.c
parent65c576e72db2fe3810721015e78a277475bda24a (diff)
mmc: spi: Toggle SPI polarity, do not hardcode it
commit af3ed119329cf9690598c5a562d95dfd128e91d6 upstream. The code in mmc_spi_initsequence() tries to send a burst with high chipselect and for this reason hardcodes the device into SPI_CS_HIGH. This is not good because the SPI_CS_HIGH flag indicates logical "asserted" CS not always the physical level. In some cases the signal is inverted in the GPIO library and in that case SPI_CS_HIGH is already set, and enforcing SPI_CS_HIGH again will actually drive it low. Instead of hard-coding this, toggle the polarity so if the default is LOW it goes high to assert chipselect but if it is already high then toggle it low instead. Cc: Phil Elwell <phil@raspberrypi.org> Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20191204152749.12652-1-linus.walleij@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'crypto/algapi.c')
0 files changed, 0 insertions, 0 deletions