]> git.baikalelectronics.ru Git - kernel.git/commit
spi: mediatek: skip delays if they are 0
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Fri, 1 Oct 2021 15:21:53 +0000 (17:21 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 1 Oct 2021 18:34:56 +0000 (19:34 +0100)
commit37431f8be27d2f0a756fde479d8ee8d25a0288f6
tree7438540ff9c750afca8f0cba9b2454a514ed6997
parentffe9fcf0d7a913132546a9be1ff7024b12b1aff6
spi: mediatek: skip delays if they are 0

In the function 'mtk_spi_set_hw_cs_timing'
the 'setup', 'hold' and 'inactive' delays are configured.
In case those values are 0 it causes errors on mt8173:

cros-ec-i2c-tunnel 1100a000.spi:ec@0:i2c-tunnel0:
Error transferring EC i2c message -71
cros-ec-spi spi0.0: EC failed to respond in time.

This patch fixes that issues by setting only the values
that are not 0.

Fixes: 676c37b59d17 ("spi: modify set_cs_timing parameter")
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Link: https://lore.kernel.org/r/20211001152153.4604-1-dafna.hirschfeld@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c