Revision e2e95e5e25421fbef499e21bf94a5339701f9a99 authored by Marek Vasut on 10 June 2021, 12:00:00 UTC, committed by Tom Rini on 30 June 2021, 12:06:30 UTC
The spi_get_bus_and_cs() may be called on the same bus and chipselect
with different frequency or mode. This is valid usecase, but the code
fails to notify the controller of such a configuration change. Call
spi_set_speed_mode() in case bus frequency or bus mode changed to let
the controller update the configuration.

The problem can easily be triggered using the sspi command:
=> sspi 0:0@1000
=> sspi 0:0@2000
Without this patch, both transfers happen at 1000 Hz. With this patch,
the later transfer happens correctly at 2000 Hz.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
1 parent 605cbcb
History
File Mode Size
.github
Licenses
api
arch
board
cmd
common
configs
disk
doc
drivers
dts
env
examples
fs
include
lib
net
post
scripts
test
tools
.azure-pipelines.yml -rw-r--r-- 16.2 KB
.checkpatch.conf -rw-r--r-- 817 bytes
.gitattributes -rw-r--r-- 169 bytes
.gitignore -rw-r--r-- 939 bytes
.gitlab-ci.yml -rw-r--r-- 9.7 KB
.mailmap -rw-r--r-- 2.3 KB
.readthedocs.yml -rw-r--r-- 502 bytes
Kbuild -rw-r--r-- 783 bytes
Kconfig -rw-r--r-- 15.5 KB
MAINTAINERS -rw-r--r-- 32.6 KB
Makefile -rw-r--r-- 75.8 KB
README -rw-r--r-- 160.7 KB
config.mk -rw-r--r-- 2.1 KB

README

back to top