]> git.baikalelectronics.ru Git - kernel.git/commit
spi: pxa2xx: Add CS control clock quirk
authorEvan Green <evgreen@chromium.org>
Tue, 11 Feb 2020 22:37:00 +0000 (14:37 -0800)
committerMark Brown <broonie@kernel.org>
Wed, 26 Feb 2020 18:45:06 +0000 (18:45 +0000)
commite175dca324db3cdb0b5b476e79a6d489ad047652
tree2f8e48dd1713364f03ad8571217b67f766e51afb
parentae4abee1686dd0266ca55c3132ae9d5d986e18ed
spi: pxa2xx: Add CS control clock quirk

In some circumstances on Intel LPSS controllers, toggling the LPSS
CS control register doesn't actually cause the CS line to toggle.
This seems to be failure of dynamic clock gating that occurs after
going through a suspend/resume transition, where the controller
is sent through a reset transition. This ruins SPI transactions
that either rely on delay_usecs, or toggle the CS line without
sending data.

Whenever CS is toggled, momentarily set the clock gating register
to "Force On" to poke the controller into acting on CS.

Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Evan Green <evgreen@chromium.org>
Link: https://lore.kernel.org/r/20200211223700.110252-1-rajatja@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c