mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Cc: "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>,
	"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: Sun, 19 Mar 2023 15:42:32 +0200	[thread overview]
Message-ID: <20230319134232.wzjvk4ddwqrbexil@kernel.org> (raw)
In-Reply-To: <DM4PR12MB576911FA514FAFEBE6B3A39FC3BF9@DM4PR12MB5769.namprd12.prod.outlook.com>

On Wed, Mar 15, 2023 at 03:47:33PM +0000, Krishna Yarlagadda wrote:
> 
> > -----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.

Both are hardwaw flows in the sense that you are controlling a piece of hardware.

BR, Jarkko

  reply	other threads:[~2023-03-19 13:42 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
2023-03-15 15:47     ` Krishna Yarlagadda
2023-03-19 13:42       ` Jarkko Sakkinen [this message]
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=20230319134232.wzjvk4ddwqrbexil@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®