Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/1] spi: fsl-lpspi: add atomic transfer support
@ 2026-11-27  7:34 ChunYuZhiQiang
  2026-11-27  7:34 ` [RFC PATCH v2 1/1] " ChunYuZhiQiang
  0 siblings, 1 reply; 3+ messages in thread
From: ChunYuZhiQiang @ 2026-11-27  7:34 UTC (permalink / raw)
  To: Mark Brown; +Cc: Frank Li, linux-spi, imx, linux-kernel, Heiko Stübner

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@yinhe.ht>

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-27  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27  7:34 [RFC PATCH v2 0/1] spi: fsl-lpspi: add atomic transfer support ChunYuZhiQiang
2026-11-27  7:34 ` [RFC PATCH v2 1/1] " ChunYuZhiQiang
2026-11-27  7:59   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox