]> git.hungrycats.org Git - linux/commit
spi: sg2044-nor: Honor SPI clock limits
authorHan Gao <gaohan@iscas.ac.cn>
Wed, 30 Sep 2026 18:22:51 +0000 (02:22 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 Oct 2026 15:26:28 +0000 (17:26 +0200)
commit61d44a2c07b2ad3f7db167f17ff2461ffe78441c
tree32976a374280288ef32b76ec915762f5ca7539f7
parente130c54fbb603f9aeacf5029789b4a2c8c48f416
spi: sg2044-nor: Honor SPI clock limits

The fixed divider ignores device and operation clock limits. Calculate
the divider before each transfer so SCK does not exceed either limit.

Advertise the controller maximum speed so the SPI core supplies a default
when the device omits its maximum speed. Use the fastest divider when no
speed limit is supplied.

Fixes: de16c322eefb ("spi: sophgo: add SG2044 SPI NOR controller driver")
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Link: https://patch.msgid.link/20261001-fix-sg204xspi-v2-2-014dbaf22b5e@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-sg2044-nor.c