linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Yarlagadda <kyarlagadda@nvidia.com>
To: Jarkko Sakkinen <jarkko@kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"peterhuewe@gmx.de" <peterhuewe@gmx.de>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"linux-spi@vger.kernel.org" <linux-spi@vger.kernel.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-integrity@vger.kernel.org"
	<linux-integrity@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Laxman Dewangan <ldewangan@nvidia.com>
Subject: RE: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
Date: Wed, 15 Mar 2023 15:47:33 +0000	[thread overview]
Message-ID: <DM4PR12MB576911FA514FAFEBE6B3A39FC3BF9@DM4PR12MB5769.namprd12.prod.outlook.com> (raw)
In-Reply-To: <01959c869e01075705cd436afa822f2586d0509c.camel@kernel.org>


> -----Original Message-----
> From: Jarkko Sakkinen <jarkko@kernel.org>
> Sent: 12 March 2023 03:19
> 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; Jonathan Hunter <jonathanh@nvidia.com>;
> Sowjanya Komatineni <skomatineni@nvidia.com>; Laxman Dewangan
> <ldewangan@nvidia.com>
> Subject: Re: [Patch V8 2/3] tpm_tis-spi: Add hardware wait polling
> 
> External email: Use caution opening links or attachments
> 
> 
> 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
Though condition is based on half duplex, functions are implementing
HW or SW flow of the transfer.
KY
> 
> 1. tpm_tis_spi_transfer_half()
> 2. tpm_tis_spi_transfer_full()
> 
> BR, Jarkko

  reply	other threads:[~2023-03-15 15:47 UTC|newest]

Thread overview: 9+ 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
2023-03-15 15:47     ` Krishna Yarlagadda [this message]
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

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=DM4PR12MB576911FA514FAFEBE6B3A39FC3BF9@DM4PR12MB5769.namprd12.prod.outlook.com \
    --to=kyarlagadda@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --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;
as well as URLs for NNTP newsgroup(s).