Re: [PATCH v1 3/3] spi: geni-qcom: Add target abort support
From: Konrad Dybcio
Date: Tue Jan 27 2026 - 08:22:03 EST
On 1/22/26 4:10 PM, Praveen Talari wrote:
> 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@xxxxxxxxxxxxxxxx>
> ---
> drivers/spi/spi-geni-qcom.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
> index e5320e2fb834..231fd31de048 100644
> --- a/drivers/spi/spi-geni-qcom.c
> +++ b/drivers/spi/spi-geni-qcom.c
> @@ -1009,6 +1009,17 @@ static irqreturn_t geni_spi_isr(int irq, void *data)
> return IRQ_HANDLED;
> }
>
> +static int spi_geni_target_abort(struct spi_controller *spi)
> +{
> + if (!spi->cur_msg)
> + return 0;
> +
> + handle_se_timeout(spi, spi->cur_msg);
I can't help but notice this function never even dereferences this
argument
Konrad