Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: geni-qcom: Add target abort support

SPI target mode currently lacks a mechanism to gracefully abort ongoing
transfers when the client or core needs to cancel active transactions.

Implement spi_geni_target_abort() to handle aborting SPI target
operations when the client and core want to cancel ongoing transfers.
This provides a mechanism for graceful termination of active SPI
transactions in target mode.

Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://patch.msgid.link/20260204162854.1206323-5-praveen.talari@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Praveen Talari and committed by
Mark Brown
6516169f 9934383f

+14
+14
drivers/spi/spi-geni-qcom.c
··· 1003 1003 return IRQ_HANDLED; 1004 1004 } 1005 1005 1006 + static int spi_geni_target_abort(struct spi_controller *spi) 1007 + { 1008 + if (!spi->cur_msg) 1009 + return 0; 1010 + 1011 + handle_se_timeout(spi); 1012 + spi_finalize_current_transfer(spi); 1013 + 1014 + return 0; 1015 + } 1016 + 1006 1017 static int spi_geni_probe(struct platform_device *pdev) 1007 1018 { 1008 1019 int ret, irq; ··· 1086 1075 init_completion(&mas->tx_reset_done); 1087 1076 init_completion(&mas->rx_reset_done); 1088 1077 spin_lock_init(&mas->lock); 1078 + 1079 + if (spi->target) 1080 + spi->target_abort = spi_geni_target_abort; 1089 1081 1090 1082 ret = geni_icc_get(&mas->se, NULL); 1091 1083 if (ret)