[RFC PATCH v2 0/1] spi: fsl-lpspi: add atomic transfer support
From: ChunYuZhiQiang
Date: Fri Nov 27 2026 - 02:40:43 EST
This is a resend of the fsl_lpspi follow-up to Heiko Stuebner's "spi:
Implement a atomic transfer as a last resort" series. v1 was based on an
earlier revision of that series and no longer applied; this version is
based on current broonie/spi for-next, where Heiko's v4 is applied
(for-next 63083539d2bf).
The panic entry point and its pstore/NVMEM user are split into a
follow-up series, so this one only adds a second transfer_atomic()
implementation next to Rockchip's.
The callback uses PIO polling with DMA and interrupts disabled, resets the
controller before the message, handles chip select and delays through the
core helpers, and caches the per-clock rate because clk_get_rate() takes
the clock prepare lock. Poweroff and restart prepare handlers
runtime-resume the controller before shutdown, matching Rockchip.
Only host mode registers the callback.
Changes in v2:
- rebased onto current for-next with Heiko's v4 applied;
- split spi_sync_atomic() and the pstore/NVMEM user into a separate
series to keep this controller-only.
Testing: compile-tested on x86 with COMPILE_TEST and on arm64, including
against the for-next version of the driver. Hardware validation on
i.MX8QXP is still pending.
This cover letter and the patch were prepared with AI assistance; the
submitter must review them before submission.
Thanks,
ChunYuZhiQiang
Signed-off-by: ChunYuZhiQiang <chunyuzhiqiang@xxxxxxxx>
ChunYuZhiQiang (1):
spi: fsl-lpspi: add atomic transfer support
drivers/spi/spi-fsl-lpspi.c | 171 ++++++++++++++++++++++++++++++++++--
1 file changed, 163 insertions(+), 8 deletions(-)
base-commit: 63083539d2bf955ccf84042d4b044d1133752bed
--
2.47.3