From: Praveen Talari <praveen.talari@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>
Cc: chandana.chiluveru@oss.qualcomm.com,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] spi: qcom-geni: Use GPIO to notify master of SPI target activity
Date: Wed, 19 Aug 2026 22:12:36 +0530 [thread overview]
Message-ID: <15e37bb5-db13-4c09-b5c5-a9e92030eb60@oss.qualcomm.com> (raw)
In-Reply-To: <09f10e30-f613-4a22-941c-1db63b190186@oss.qualcomm.com>
Hi konrad
On 19-08-2026 19:30, Konrad Dybcio wrote:
> On 8/18/26 3:38 PM, Praveen Talari wrote:
>> When operating in SPI target mode, the GENI controller relies on an
>> external GPIO to notify the SPI master about the target's active state.
>>
>> Add support for an optional ready GPIO that is asserted when a target
>> transfer begins and deasserted when the transfer completes, is aborted,
>> or hits a timeout. This allows the target to explicitly signal its
>> availability to the master and ensures the GPIO is released in all error
>> and completion paths, preventing the master from observing a stale or
>> incorrect target-ready indication.
> [...]
>
>> + if (spi->target && mas->target_gpio)
>> + gpiod_set_value(mas->target_gpio, 0);
> FWIW it seems like the gpiod APIs can eat nullptrs
Oh, let me review and update.
>
> [...]
>
>> @@ -1131,8 +1144,16 @@ static int spi_geni_probe(struct platform_device *pdev)
>> init_completion(&mas->rx_reset_done);
>> spin_lock_init(&mas->lock);
>>
>> - if (spi->target)
>> + if (spi->target) {
>> spi->target_abort = spi_geni_target_abort;
>> + mas->target_gpio = devm_gpiod_get_index_optional(dev, "ready", 0,
>> + GPIOD_OUT_LOW);
> Is there a reason for the get_index_ variant specifically?
There is no specific reason. i just had choosen with index.
>
> i.e. why not just devm_gpiod_get_optional()?
Yes, we can use it.
Thanks,
Praveen Talari
>
> Konrad
prev parent reply other threads:[~2026-08-19 16:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 13:38 [PATCH v3 0/2] spi: qcom-geni: Use GPIO to notify master of SPI target activity Praveen Talari
2026-08-18 13:38 ` [PATCH v3 1/2] spi: dt-bindings: Document ready-gpios property Praveen Talari
2026-08-18 13:38 ` [PATCH v3 2/2] spi: qcom-geni: Use GPIO to notify master of SPI target activity Praveen Talari
2026-08-18 13:48 ` sashiko-bot
2026-08-19 14:00 ` Konrad Dybcio
2026-08-19 16:42 ` Praveen Talari [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15e37bb5-db13-4c09-b5c5-a9e92030eb60@oss.qualcomm.com \
--to=praveen.talari@oss.qualcomm.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=chandana.chiluveru@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).