From: Jarkko Sakkinen <jarkko@kernel.org>
To: Krishna Yarlagadda <kyarlagadda@nvidia.com>,
robh+dt@kernel.org, broonie@kernel.org, peterhuewe@gmx.de,
jgg@ziepe.ca, krzysztof.kozlowski+dt@linaro.org,
linux-spi@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: thierry.reding@gmail.com, jonathanh@nvidia.com,
skomatineni@nvidia.com, ldewangan@nvidia.com
Subject: Re: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
Date: Sat, 11 Mar 2023 23:48:57 +0200 [thread overview]
Message-ID: <01959c869e01075705cd436afa822f2586d0509c.camel@kernel.org> (raw)
In-Reply-To: <20230302041804.24718-3-kyarlagadda@nvidia.com>
On Thu, 2023-03-02 at 09:48 +0530, Krishna Yarlagadda wrote:
> +int tpm_tis_spi_transfer(struct tpm_tis_data *data, u32 addr, u16
> len,
> + u8 *in, const u8 *out)
> +{
> + struct tpm_tis_spi_phy *phy = to_tpm_tis_spi_phy(data);
> + struct spi_controller *ctlr = phy->spi_device->controller;
> +
> + /*
> + * TPM flow control over SPI requires full duplex support.
> + * Send entire message to a half duplex controller to handle
> + * wait polling in controller.
> + * Set TPM HW flow control flag..
> + */
> + if (ctlr->flags & SPI_CONTROLLER_HALF_DUPLEX)
> + return tpm_tis_spi_hw_flow_transfer(data, addr, len,
> in,
> + out);
> + else
> + return tpm_tis_spi_sw_flow_transfer(data, addr, len,
> in,
> + out);
> +}
> +
Based on the condition, better names would be
1. tpm_tis_spi_transfer_half()
2. tpm_tis_spi_transfer_full()
BR, Jarkko
next prev parent reply other threads:[~2023-03-11 21:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 4:18 [Patch V8 0/3] Tegra TPM driver with HW flow control Krishna Yarlagadda
2023-03-02 4:18 ` [Patch V8 1/3] spi: Add TPM HW flow flag Krishna Yarlagadda
2023-04-19 22:34 ` Jerry Snitselaar
2023-03-02 4:18 ` [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling Krishna Yarlagadda
2023-03-11 21:48 ` Jarkko Sakkinen [this message]
2023-03-15 15:47 ` Krishna Yarlagadda
2023-03-19 13:42 ` Jarkko Sakkinen
2023-03-23 11:59 ` Krishna Yarlagadda
2023-03-02 4:18 ` [Patch V8 3/3] spi: tegra210-quad: Enable TPM " Krishna Yarlagadda
[not found] ` <20230319142737.2191-1-hdanton@sina.com>
2023-03-23 11:57 ` [Patch V8 2/3] tpm_tis-spi: Add hardware " Krishna Yarlagadda
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=01959c869e01075705cd436afa822f2586d0509c.camel@kernel.org \
--to=jarkko@kernel.org \
--cc=broonie@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jonathanh@nvidia.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kyarlagadda@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=robh+dt@kernel.org \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.com \
/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
all inboxes | Powered by JetHome®