summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2025-06-04 15:52:19 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2025-07-30 11:32:05 +0200
commita11a51896572273d04a9f6011ad22738c52ba554 (patch)
treef371d843414c1d2d63353a120f76ee5d764ac595 /include/linux
parent62df72a0ab22b3377aeba3b2159ab35274a4106f (diff)
spi: spi-mem: Take into account the actual maximum frequency
In order to pick the best variant, the duration of each typical operation is derived and then compared. These durations are based on the maximum capabilities of the chips, which are commonly the limiting factors. However there are other possible limiting pieces, such as the hardware layout, EMC considerations and in some cases, the SPI controller itself. We need to take this into account to further refine our variant choice, so let's use the actual frequency that will be used for the operation instead of the theoretical maximum. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/spi/spi-mem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spi/spi-mem.h b/include/linux/spi/spi-mem.h
index c4830dfaff3d..82390712794c 100644
--- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h
@@ -424,7 +424,7 @@ bool spi_mem_default_supports_op(struct spi_mem *mem,
int spi_mem_adjust_op_size(struct spi_mem *mem, struct spi_mem_op *op);
void spi_mem_adjust_op_freq(struct spi_mem *mem, struct spi_mem_op *op);
-u64 spi_mem_calc_op_duration(struct spi_mem_op *op);
+u64 spi_mem_calc_op_duration(struct spi_mem *mem, struct spi_mem_op *op);
bool spi_mem_supports_op(struct spi_mem *mem,
const struct spi_mem_op *op);