linux/include
David Lechner 7b1d87af14
spi: add spi_optimize_message() APIs
This adds a new spi_optimize_message() function that can be used to
optimize SPI messages that are used more than once. Peripheral drivers
that use the same message multiple times can use this API to perform SPI
message validation and controller-specific optimizations once and then
reuse the message while avoiding the overhead of revalidating the
message on each spi_(a)sync() call.

Internally, the SPI core will also call this function for each message
if the peripheral driver did not explicitly call it. This is done to so
that controller drivers don't have to have multiple code paths for
optimized and non-optimized messages.

A hook is provided for controller drivers to perform controller-specific
optimizations.

Suggested-by: Martin Sperl <kernel@martin.sperl.org>
Link: https://lore.kernel.org/linux-spi/39DEC004-10A1-47EF-9D77-276188D2580C@martin.sperl.org/
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://msgid.link/r/20240219-mainline-spi-precook-message-v2-1-4a762c6701b9@baylibre.com
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-02-26 13:55:10 +00:00
..
acpi IOMMU Updates for Linux v6.8 2024-01-18 15:16:57 -08:00
asm-generic RISC-V Patches for the 6.8 Merge Window, Part 4 2024-01-20 11:06:04 -08:00
clocksource
crypto crypto: skcipher - remove excess kerneldoc members 2023-12-29 11:25:56 +08:00
drm drm-next for 6.8: 2024-01-12 11:32:19 -08:00
dt-bindings dmaengine fixes for v6.8-rc1 2024-01-20 15:03:25 -08:00
keys
kunit Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
kvm
linux spi: add spi_optimize_message() APIs 2024-02-26 13:55:10 +00:00
math-emu
media media: v4l2-subdev: Follow renaming of SPI "master" to "controller" 2024-02-08 11:54:42 +00:00
memory
misc
net netfilter pull request 24-01-31 2024-02-01 09:14:13 -08:00
pcmcia
ras
rdma
rv
scsi
soc - New Device Support 2024-01-17 15:21:21 -08:00
sound ASoC: cs35l56: Allow more time for firmware to boot 2024-02-01 12:57:26 +00:00
target
trace Miscellaneous bug fixes and cleanups in ext4's multi-block allocator 2024-02-04 07:33:01 +00:00
uapi TTY/Serial driver fixes for 6.8-rc3 2024-02-04 06:58:23 +00:00
ufs
vdso
video video/sticore: Remove info field from STI struct 2024-01-12 12:38:37 +01:00
xen xen: update PV-device interface headers 2024-01-09 11:46:24 +01:00