]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: spi-mem: add spi_mem_adjust_op_freq() in spi_mem_supports_op()
authorTianyu Xu <xtydtc@gmail.com>
Tue, 5 Aug 2025 01:54:03 +0000 (09:54 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 6 Aug 2025 12:31:31 +0000 (13:31 +0100)
commita4f8e70d75dd11ab1a01894893e0b03f1d0b61fd
tree6d14585a6bd75b38d00fee0c886c4a79b6c6c708
parent72332439e6b0a39e763d4604e71774ab83423275
spi: spi-mem: add spi_mem_adjust_op_freq() in spi_mem_supports_op()

The function spi_mem_adjust_op_freq() within spi_mem_exec_op() adjusts
the op->max_freq, which will informs the SPI controller of the maximum
frequency for each operation. This adjustment is based on combined
information from the SPI device and the board's wiring conditions.
Similarly, spi_mem_supports_op() will check the capabilities of the SPI
controller. It also requires the combined information before it can
accurately determine whether the SPI controller supports a given operation.

Signed-off-by: Tianyu Xu <tianyxu@cisco.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://patch.msgid.link/20250805015403.43928-1-tianyxu@cisco.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mem.c